-
Notifications
You must be signed in to change notification settings - Fork 11
Logout > Login sometimes restores previous credentials #34
Copy link
Copy link
Open
Labels
Description
Describe the bug
After calling the log out API and subsequently attempting to log in again with a different email address, we're being logged in with the previous credentials not the ones entered.
To Reproduce
In code terms we're calling:
try await magic.user.getIdToken().async() // which throws
try await magic.auth.loginWithEmailOTP(.init(email: "firstEmail@test.com")).async()
// Then we log out
try await magic.user.logout().async()
// Then we go to log in with a different email address but
try await magic.user.getIdToken().async() // returns the previous token
// Which means they're logged in but with the previous email
Steps to reproduce the behavior:
- As above
Expected behavior
Once you've called the logOut() method, subsequent calls to getIdToken will throw.
Environment
- Package Version: 10.0.0
- Xcode Version: 15.2, 15.3 beta
- Swift Version: 5.9, 5.10
- Simulator / Device OS: * Simulator + Device (iOS 17.2.1, iOS 17.4)
Additional context
Log out is an unusual operation in our app but this issue is subjectively reproducible 15-25% of the time in our testing.
Reactions are currently unavailable