2.0.6 uses different token to 2.0.5

Created by: rickselby

I'll start by saying I'm just a user of the gem, I have no idea how the oauth2 process works, we use it with omniauth and cognito for authentication in AWS.

When upgrading to 2.0.6, our logins broke. On investigation, I see the following in the logs:

OAuth2::AccessToken.from_hash: `hash` contained more than one 'token' key (["id_token", "access_token"]); using "id_token".

Looking at the code changes from #624, the access_token was previously being preferred over the id_token, so I'm assuming this is the bug.

I've corrected this and added a test to ensure the gem will still function as it did before.

Merge request reports

Loading