[Auth] [Critical] Authentication cookie lockup when multiple user data exists
See original GitHub issueI’ve identified an edge case where “bad cookies” can cause a site to be prevented from loading (shows “pending” in Chrome DevTools Network tab) and is stuck indefinitely.
I’ve set Auth to use cookies for storage.
To Reproduce Steps to reproduce the behavior:
- (web) Create a new user
- (web) Log in as user
- (AWS console) Delete user in Cognito interface
- (web) Create new user
Expected behavior Website should be accessible.
Screenshots
Note the set of two credentials in the cookies. The website is totally stuck until I remove the old set. I can even spin up a completely different web application that doesn’t even have Cognito, and when I surf to localhost:8080
, it’s stuck due to these cookies. Once I remove the set of cookies for the user starting with 7fd32
, the issue is gone and I can surf normally.
Why this would happen in the real world A user deletes their account, and then several days later, changes their mind and signs up again by creating a new account.
Desktop (please complete the following information):
- OS: macOS 10.14.3
- Browser: Chrome
- Version: 72
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (7 by maintainers)
Top GitHub Comments
I worked around this by explicitly calling
Auth.logout()
when a user logs out (or the app detects their account has been deleted or suspended).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
*-help
channels or Discussions for those types of questions.