Closed ptaranto closed 2 years ago
This is fixed in the UI side; aws-amplify/amplify-ui#1683
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server amplify-help
forum.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
After successful login with tokens saved in local storage, launching the app when the refresh token is expired the browser tab crashes.
I was able to breakpoint it and check that tokens in local storage are cleared by CognitoUser.js, dispatchAuthEvent('tokenRefresh_failure', error, "Failed to retrieve new token"); is called by AuthClass, then it gets lost when running a generator function in Auth.js
Expected behavior
user is redirected to the Authenticator login form
Reproduction steps
Code Snippet
https://codesandbox.io/s/zealous-star-xhj15y
Log output
aws-exports.js
No response
Manual configuration
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
Cross-posting in amplify-ui repo https://github.com/aws-amplify/amplify-ui/issues/1773