-
Notifications
You must be signed in to change notification settings - Fork 254
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
Same token generated for different accounts from the same device #5512
Comments
Hi @ascentman, thanks for reporting this issue. Nothing stands out to me from the screenshot. We will try to reproduce the behavior. Can you please provide your Gen 2 Auth definition? |
thanks for response. Not sure I understand the input I should provide. If you mean config, here it is:
And here is a part of terraform code for deploying Cognito:
|
Hi @ascentman, I was interested in seeing your Gen 2 Auth schema definition, similar to what is found in this guide under the section Although it looks like you're using terraform instead, which I suspect is where the issue is. I could not reproduce the issue on a fresh Gen 2 backend which that uses email and social login auth methods. One callout, is the following line Consider the following to validate the Tokens you are retrieving are identical. Print Please let us know what you find, and if the tokens are indeed identical. |
Sorry, @Equartey for bothering you but you helped me to investigate deeper the problem and find a root cause. I compared both raw tokens and they both were the same, but when I started looking into the data it holds - I found that the same data used in both cases (email, name, etc of the first user) and then it was cached in my |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Description
I noticed that the same token (id, access and refresh) is used for different accounts from the same device. I tried to sign in with email then signed out and tried then social sign in with Google using
signInWithWebUI
. Then for both accounts same token was generated (or created once and then reused).Documentation is clear about this:
But on practice it wasn't so in my case. I assume that the issue isn't on mobile side as everything is managed by Cognito itself but in our configuration or in Cognito.
Here is our App client information configuration:
Categories
Steps to Reproduce
signOut()
fetchAuthSession
and check idToken for both users:Screenshots
No response
Platforms
Flutter Version
3.22.2
Amplify Flutter Version
2.2.0
Deployment Method
Amplify Gen 2
Schema
No response
The text was updated successfully, but these errors were encountered: