-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid JWT token type (invalid_credentials: OAuth2::Error) #157
Comments
What version of this gem are you on? |
|
I think its being caused by this change in the oauth2 gem https://github.com/oauth-xx/oauth2/pull/621/files#diff-b665e6fc2096be34f9c5e92cb0f38eb3a229da37ed4da92487f0a834eb6ae336R53 as per discussion |
Okay, report the issue to them if you wouldn't mind, we'll have to PR here to pin the version below the breaking one |
After a lot of testing I found a solution to my issue, but not entirely sure of the cause. I think it was a combination of rack middleware misconfiguring, and double-loading my strategy. At one point I was getting errors about not providing an oauth Client ID from my provider and tracked back the issue. For some reference tho: Summary: After implementing Omniauth, I had to use the standard
|
I am currently using this gem in a couple of Rails projects without issue connecting to an IdentityServer with openid/oauth.
I was previously using a fairly basic handwritten Oauth handler in a modular sinatra project and wanted to migrate to this gem to be consistent.
I transferred over my strategy but when I log in now, I hit my oauth server requesting an
id_token code
method, get back a response with acode
. That is then passed to the token endpoint and I get back a response with anid_token
and anaccess_token
. However when I callaccess_token.get('connect/userinfo')
to get my user info, the HTTP call seems to be using theid_token
not theaccess_token
and so I am getting a 401 unauthorised error.I can't seem to figure out what's going wrong.
Token response
As such, its not even hitting my callback URL as Puma is catching the error.
The text was updated successfully, but these errors were encountered: