Closed ptaranto closed 2 years ago
cross-posting in amplify-js too https://github.com/aws-amplify/amplify-js/issues/9833
Hi @ptarnto, thanks for the detailed repro steps!
This is a duplicate of #1683 so I'll close this one and track progress in #1683. I'm looking into this issue now -- please expect an update by this week.
Hi @ptaranto, the fix PR has been merged and will be released later today. I'll let you know again after the release.
thanks @wlee221 , that's great, looking forward for the release
Update -- this has been released to
@aws-amplify/ui-angular@2.4.1
@aws-amplify/ui-react@2.16.1
@aws-amplify/ui-vue@2.4.1
Please let us know if the issue persists 🙏
@wlee221 thanks for the update and sorry for the late reply, the issue wasn't fixed in 2.16.1 but seems to be fixed in 2.17.0
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Authenticator
How is your app built?
NX/webpack
Please describe your 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
What's the expected behaviour?
user is redirected to the Authenticator login form
Help us reproduce the bug!
Code Snippet
https://codesandbox.io/s/zealous-star-xhj15y
Additional information and screenshots
libs in package.json: "@aws-amplify/ui-react": "2.13.0" "amazon-cognito-identity-js": "^5.2.8" "aws-amplify": "^4.3.19"
Notes:
CognitoUser
AuthClass
Auth