-
Notifications
You must be signed in to change notification settings - Fork 694
"validating access_token failed. wrong state/nonce." when performing silentRefresh manually #472
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
302 should be fine. It's just the redirect back to your SPA. This issue occours most of the time due to a race conditions. Is it possible that "at the same time" another part of the software is calling In this case, the following sequence would happen:
|
@manfredsteyer Just double checked the application - there is no way that any other part of the application is calling silent refresh or init implicit flow. Are there any other possible reasons? Another weird thing is that if I have automatic silent refresh set up, |
can you reproduce this using a simple example? |
Never mind, turns out I was using wrong redirectUri in the config. This issue can be closed. |
@gustavshf Good to hear you found the root cause. I think you can close the issue yourself, should be a button next to the green "Comment" button at the bottom of the page. |
Angular version: 5.2.7
angular-oauth2-oidc version: 3.1
I have the following setup:
When performing a silent refresh, I need to get the new access token and pass it to other parts of the application. This is how I attempt to get the token:
When I manually do the silent refresh, I get an error that says "validating access_token failed. wrong state/nonce.".
I have auto-silent refresh set up as well, however the events are not triggered when the silent refresh happens, so I can't pass the token to the other parts of the application there either.
The silent refresh request always returns 302 error.
Am I doing something wrong?
I'm using initImplicitFlow() BTW.
The text was updated successfully, but these errors were encountered: