-
Notifications
You must be signed in to change notification settings - Fork 450
Closed
Description
Version
5.0.3
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
silent renew failed! Error: Error: authorizedCallback, token(s) validation failed, resetting.
Steps to reproduce the behavior
1) Set up OIDC Code Flow PKCE using refresh tokens (used 'ng add angular-auth-oidc-client')
2) Set up custom storage using localStorage (used example from https://angular-auth-oidc-client.com/docs/documentation/custom-storage)
4) To speed up testing, setup your authority to have short lived access and refresh tokens. (i.e. 1 or 2 minutes)
3) Login using one browser [chrome] tab (i.e. this.oidcSecurityService.authorize()). Open console and verify refresh is working
4) Open a few more tabs. Open console and verify they are authorized and refreshing
5) Wait until error occurs. It shouldn't take long - usually 2-10 minutes with 1 minute tokens. Open more tabs if needed.
A clear and concise description of what you expected to happen.
access token should refresh successfully and all tabs remain authorized
Additional context
It seems that multiple tabs simultaneously attempting to refresh the token using a shared localStorage is causing a race condition, resulting in validation failure.
Adrii77 and sohibegit
Metadata
Metadata
Assignees
Labels
No labels