-
Notifications
You must be signed in to change notification settings - Fork 93
Fixed ID token nonce claim validation #104
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
Conversation
5698083 to
9b844ad
Compare
|
Presumably the global variable is not persisting across internal redirects (as was the intention)? |
9b844ad to
823bb0a
Compare
@lcrilly That's right.
Yep, makes sense. Please see the changes in the latest push. |
Previously, ID token nonce claim validation was skipped in all cases due to lack of detection of if the session was a new session.
823bb0a to
561ba74
Compare
|
@lcrilly Actually, as was pointed out by interested parties out of band - that would not work, as the js_var will not persist beyond the 302 redirect to the IDP that occurs later in the auth function. Reverting the commit back the original, and also converting newSession to a local variable in id_token_validation function, as it no longer needs to be global. |
|
https://openid.net/specs/openid-connect-core-1_0.html#IDToken says
Should the nonce check even be wrapped in the newSession if()? Skimming the docs I can't seem to find a definitive answer whether the renewal response contains the original nonce. I'm assuming there's cases where it doesn't. Looking at the spec I'm wondering if this should:
https://learn.microsoft.com/en-us/entra/identity-platform/id-tokens says |
Improve token nonce claim validation to better comply with OIDC spec.
|
Co-authored-by: Ivan Ovchinnikov <[email protected]>
Co-authored-by: Ivan Ovchinnikov <[email protected]>
Previously, ID token nonce claim validation was skipped in all cases due to lack of detection of if the session was a new session.