-
Notifications
You must be signed in to change notification settings - Fork 259
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
getIdTokenClaims resolves successfully but returns undefined
for ID Claims
#402
Comments
Hi @shahid7292 - thanks for raising this Did you provide different scopes to Calling <Auth0Provider>...</Auth0Provider>
// SDK's default scope is now "openid profile email"
loginWithRedirect({ scope: 'custom-scope' });
// the cache is now populated with 1 token for scope=custom-scope
getIdTokenClaims()
// this looks up the cache for default scope=openid profile email and finds nothing, since only scope=custom-scope is in the cache
getIdTokenClaims({ scope: 'custom-scope' })
// will return the ID token in the cache Note there is work to simplify this behaviour in SPA JS v2 auth0/auth0-spa-js#967 |
@adamjmcgrath i have not passed scope anywhere. I have left it to default values |
This code is working fro me in this way.
|
I just ran into this behavior and it's unintuitive and frustrating. Is there a reason that |
As explained in the other issue, having no id token is a valid use case when the user hasnt authenticated. |
Thanks dude, why does it even behave this way. |
Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.
Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.
By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.
Describe the problem
https://community.auth0.com/t/getidtokenclaims-resolves-successfully-but-returns-undefined-for-id-claims/48139/4
I am having exact same issue discussed in this blog
What was the expected behavior?
If getIdTokenClaims resolves successfully then it should return id_token value
Environment
auth0-react
used : 1.10.2The text was updated successfully, but these errors were encountered: