-
Hello, I am using processAuthorizationCodeOpenIDResponse (that calls processGenericAccessTokenResponse) and i was hoping that it would also validate the signature but it seems that it's not possible. The other way to validate the id_token would be by using validateJwtAuthResponse but it looks like it's only for JARM flow for which a 'response' parameter is needed. The problem is that i don't have a 'response' param in my flow (PKCE with only code and state in the callback) so the function throws an error. I saw that someone mentioned another package 'jose' that have the JWKS validation. Should I use this instead or is it planned to have a way to validate an id_token in processAuthorizationCodeOpenIDResponse ? Thanks for your time |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It is intended. It is possible to do so because the only flows that are supported by this module are ones where an ID Token is retrieved from an https (TLS protected) endpoint and the specification does not require the client to check the signature of the ID Token in such cases. This behaviour is also certified by the OpenID Connect Certification Program.
For all intents and purposes, when you retrieve the ID Token from this module you don't need to validate it futher, you can immediately use getValidatedIdTokenClaims on the response and get the claims that were already in it. If you want to be checking the ID Token on any subsequent use, for instance followup requests after it has maybe been exposed to users, by all means, use a library meant for validating JWTs to ensure it was not tampered with. |
Beta Was this translation helpful? Give feedback.
It is intended. It is possible to do so because the only flows that are supported by this module are ones where an ID Token is retrieved from an https (TLS protected) endpoint and the specification does not require the client to check the signature of the ID Token in such cases.
This behaviour is also certified by the OpenID Connect Certification Program.
source
For all intent…