Validating access_token failed. wrong state/nonce in Internet Explorer only.
See original GitHub issueHi everyone,
I’m getting this error in Internet Explorer 11.
validating access_token failed. wrong state/nonce.
The scenario is the following: I have setup like below:
this.oauthService.tryLogin().then(() => {
if (!this.oauthService.hasValidIdToken() || !this.oauthService.hasValidAccessToken()) {
console.log('startSigninMainWindow URL', window.location.href)
this.oauthService.initImplicitFlow(window.location.href);
}
});
When I’m not logged in and try to go to http://localhost:4200/somecrazyroute?abc=123. It checks that I’m not logged in, send me to the IdP with “http://localhost:4200/somecrazyroute?abc=123” in the state. After logon, it correctly send me back to http://localhost:4200/somecrazyroute?abc=123. Except in Internet Explorer 11!
I know the problem is when I have query parameters like ?abc=123. If I remove it, it works.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11
Top Results From Across the Web
Access Token validating fails with JWTSecurityTokenHandler
I try to validate an access token, which I get from Azure. ... The only way around this was to deactivate the signature...
Read more >OAuthService - angular-oauth2-oidc
After receiving the access_token, this method uses it to query the userinfo endpoint in order to get information about the user in question....
Read more >OpenID Connect & OAuth 2.0 API - Okta Developer
The provided access token is invalid. server_error, The server encountered an internal error. temporarily_unavailable, The server is temporarily unavailable, ...
Read more >Azure ad access token validation in web api fails on only one ...
All three servers are in the same intranet. I have no idea what is the reason for this error only on the prod...
Read more >Validate Access Tokens - Auth0
An access token is meant for an API and should be validated only by the API for which it ... If any of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll answer my question myself, maybe it’ll help someone.
nonce
is set here: https://github.com/manfredsteyer/angular-oauth2-oidc/blob/3e4b70525738eb44f67793dfad5e0459446c5528/projects/lib/src/oauth-service.ts#L1775nonce
is mystically gone here: https://github.com/manfredsteyer/angular-oauth2-oidc/blob/3e4b70525738eb44f67793dfad5e0459446c5528/projects/lib/src/oauth-service.ts#L1405OAuthStorage
tolocalStorage
- as seen here https://github.com/manfredsteyer/angular-oauth2-oidc/issues/255#issuecomment-384210345nonce
:This workaround is far from perfect, but now the access token is always available.
@ppozeti This issue is not solved, could you open it again?
Hello everybody, we tracked the issue down to this bug in Internet Explorer: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/110656/ The bug was fixed in later versions of IE11.
Solutions:
see this:
FYI @manfredsteyer