Auth.signIn request at the same time generate same jwt token with different accounts
See original GitHub issueDescribe the bug
When submit two request to method await Auth.signIn(username, password)
at the same time with different accounts, the method generate the same token (signInUserSession.accessToken.jwtToken);
To Reproduce Steps to reproduce the behavior:
- Use the method
await Auth.signIn(username, password)
- Make two requests with different accounts at exactly the same time
- get the function’s return and go to: signInUserSession.accessToken.jwtToken
- and you will see that the generated token is the same for different accounts
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:6 (2 by maintainers)
Top Results From Across the Web
JSON web tokens are NOT meant for authenticating the same ...
Yes, it's the same as session tokens, which need to be stored in a database for different servers to verity the user authentication...
Read more >Can we use single JWT token for multiple requests?
So I can get a JWT once, and then make a bunch of requests within 30 min, and if you ... same token...
Read more >JWT is issuing the same token - java - Stack Overflow
In an authentication scheme based on tokens, the token becomes a credential of the user. Hard credentials such as username and password are ......
Read more >JWT authentication: Best practices and when to use it
Learn how to best use JWT to trust requests by using signatures, exchanging information between parties, and preventing basic security ...
Read more >Using JWT (JSON Web Tokens) to authorize users and protect ...
Arguably one of the largest use cases for JWT is authorization. We can generate a JWT token in the backend that is specific...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to reproduce this behavior, which definitely appears to be a race-condition:
jwtToken
:So we can help prioritize this issue, can you provide some detail on why two separate user accounts are being signed in simultaneously? Thanks!
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.