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

Unable to catch state mismatch error #207

Open
martijnkorteweg opened this issue Feb 28, 2022 · 0 comments
Open

Unable to catch state mismatch error #207

martijnkorteweg opened this issue Feb 28, 2022 · 0 comments

Comments

@martijnkorteweg
Copy link

Expected Behavior

[REQUIRED] Describe expected behavior

When calling completeAuthorizationRequestIfPossible I would like to be able to catch the error where the current request state mismatches the returned state. There is already an error response in the notifier that could easily be used for this, and resolving completeAuthorizationRequest with {request, null, error} would solve this issue.

Describe the problem

[REQUIRED] Actual Behavior

When calling completeAuthorizationRequestIfPossible and the state is mismatched, there is a console log that this happened but no way to actually act on this outcome.

[REQUIRED] Steps to reproduce the behavior

In my implementation this issue came up when a user had multiple tabs open and they tried to sign in to each of the tabs. This caused the tabs that are mismatched to be stuck. To replicate the issue simple attempt a login with your favorite provider but before submitting the login change the current appauth_current_authorization_request to something else. This will log Mismatched request (state and request_uri) dont match. but nothing else happens.

[REQUIRED] Environment

  • AppAuth-JS version: 1.3.1
  • AppAuth-JS Environment (Node, Browser (UserAgent), ...): Latest Chrome
  • Source code snippts (inline or JSBin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant