amazon-archives / amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
Other
985 stars 454 forks source link

cognito returns different accesstokens when requested parallelly #603

Closed abhishekpalavancha closed 6 years ago

abhishekpalavancha commented 6 years ago

i have end points in web service which are requested by client at same exact time by same user so when client sends expired token at same time cognito returns different tokens and when i see jwt i see same expiration time is this expected?

itrestian commented 6 years ago

I don't really understand the issue. The tokens should be different on different successful authentications. What exactly is the problem here?

abhishekpalavancha commented 6 years ago

So problem is when a token is requested to cognito by two different request at same time I get two different tokens. I was expecting tokens to be same when requested at same time. On our server side we only keep track one token per user expecting cognito to handle concurrent requests. So I wanted to know if this is expected behavior and also if any suggestions to handle concurrent token requests.

itrestian commented 6 years ago

That's pretty much expected behavior according to the standards.