-
Notifications
You must be signed in to change notification settings - Fork 694
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
"Wrong nonce: undefined" during login with Password grant #1324
Comments
Hi @ali-kashanian, |
Hi @TiBz0u, |
Hi @ali-kashanian, sorry for late response. |
@TiBz0u @ali-kashanian Have you found a solution to this issue? I am also getting this error. |
Unfortunately, no. I was hoping that someone from the developer team would reach out. |
+1 |
1 similar comment
+1 |
Still an issue, so I am here just to bump this. |
Provided a fix for this in #1455 |
I found a workaround for this while we're waiting on the PR to hopefully get merged and released. There is a method in the OAuthService called "createAndSaveNonce()". Although it's marked as public, there is no documentation about it and there might be a chance that it goes away in the future releases. Instead of calling "fetchTokenUsingPasswordFlow()", I use the "fetchTokenUsingGrant()" method with grant_type: password:
The server should add the nonce to the Id Token if it's it's provided in the authentication request (https://openid.net/specs/openid-connect-core-1_0.html#IDToken) |
Hello,
I have recently upgraded my project to Angular v14 and oidc package to 14.0.1. I am using a combination of Password and Code flows in my project. The configuration I use is as follows:
I started experiencing the following error after I upgraded my project to v14.0.1 when calling fetchTokenUsingPasswordFlow():
In the Developer console, there is a warning right before the error:
After looking at the source code, I found out that the error is coming from the following chain of method calls:
oauth-service.ts:824 > fetchTokenUsingPasswordFlow():833 > fetchTokenUsingGrant():903 > processIdToken():2240
It seems like the skipNonceCheck parameter of the processIdToken() method is not set. I'm not quite sure whether we need nonce for Password grant, but looking at line 971 where processIdToken() is used for refresh_token grant, the skipNonceCheck parameter is set to true.
Is this a bug or am I missing any configuration?
The text was updated successfully, but these errors were encountered: