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

Released browser lock on getTokenSilently error #276

Merged
merged 1 commit into from
Nov 8, 2019

Conversation

stevehobbsdev
Copy link
Contributor

Description

This PR ensures that the browser lock is released if getTokenSilently encounters an error. Without this, a potential delay of 5 seconds is introduced between calls could occur during silent authentication as the lock is not released.

References

Fixes #275

Testing

Steps to reproduce:

  • When the test page loads, open dev tools
  • Click "Get access token with no interaction"
  • Note that an Uncaught (in promise) "login_required" error is logged to the console almost immediately.
  • Click "Get access token with no interaction" again
  • The second time, it will (normally, see below*) take around five seconds for the error to be logged to the console. There is also normally a TypeError: Cannot read property 'close' of undefined error logged alongside.
  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@stevehobbsdev stevehobbsdev added the CH: Fixed PR is fixing a bug label Nov 8, 2019
@stevehobbsdev stevehobbsdev requested a review from a team November 8, 2019 18:32
@stevehobbsdev stevehobbsdev merged commit 8808003 into master Nov 8, 2019
@stevehobbsdev stevehobbsdev deleted the fix/lock-error branch November 8, 2019 19:57
@stevehobbsdev stevehobbsdev added this to the vNext milestone Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Fixed PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getTokenSilently Lock is not released on error
2 participants