-
Notifications
You must be signed in to change notification settings - Fork 1.3k
After successfully exchanging the token using token exchange, calling the userinfo endpoint reports invalid_token #1866
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
Comments
What is token type you are using ? Is it |
It has nothing to do with the REFERENCE token or the SELF_CONTAINED token. The token exchange does not save the idToken, which causes the userinfo to be unable to obtain the idToken and report an error. |
I think you have missed configuration. Or you mis about user logged in or client doesn’t have ‘openid’ scope. Because IDToken only generate when user and client have openid scope. |
@chenzhenjia Can you please provide more details on your use case. Why are you performing a token exchange using the access token provided by the OpenID authentication flow? Why can't you use the original access token to call /userinfo endpoint? |
@jgrandja Because the scope is inconsistent, token exchange is required, but userinfo still needs to be called after exchanging the token |
I don't quite understand your reason why you need to call the /userinfo endpoint with the new "exchanged" access token. Either way, the original access token MUST be used when calling the /userinfo endpoint since it's associated with the Line 193 in b76300b
The |
Expected Behavior
The userinfo endpoint should return user information successfully after a token exchange, using the valid access token.
Current Behavior
When calling the userinfo endpoint after a successful token exchange, an invalid_token error is returned.
Context
This issue affects the ability to retrieve user information after a token exchange.
The text was updated successfully, but these errors were encountered: