Skip to content
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

[Bug]: SilentRenew clears codeVerifier for manual request #1558

Open
yelhouti opened this issue Oct 19, 2022 · 0 comments
Open

[Bug]: SilentRenew clears codeVerifier for manual request #1558

yelhouti opened this issue Oct 19, 2022 · 0 comments

Comments

@yelhouti
Copy link
Contributor

14.1.5
...

Describe the bug
When I am writing automatic tests with Cypress (This is not related to cypress but I am putting here to help others find the issue), it seems that I click a bit too fast on the login button, (ie: just after silentRenew request being sent, before silentRenew failing). Furthermore, login() doesn't open the Idp login page fast enough and silentRenew failure is processed.

All these bad timings, causes the silentRenew failure to clear the codeVerifier, state... even if state doesn't match.

This causes the code after, successful authentication to fail to validate the response and get the token.

To Reproduce
Be unlucky like me :D

Expected behavior
resetAuthorizationData should not be called if the state in the url doesn't match, the one stored.

Workaround
Workaround for others, wait 1s before clicking on logging, or wait for silent renew failure in iframe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants