amazon-archives / amazon-cognito-auth-js

The Amazon Cognito Auth SDK for JavaScript simplifies adding sign-up, sign-in with user profile functionality to web apps.
Apache License 2.0
424 stars 232 forks source link

Session/CachedSession null before token expires #211

Open AntonioBusillo opened 4 years ago

AntonioBusillo commented 4 years ago

Hello everyone, I'm trying to use the Autherization Code Grant flow with this SDK but I have a problem: the session expires way before the token, also it becomes undefined when I change website and then I return to my page.

I'm following the documentation and this example with some edits in order to handle the session refresh and other things.

As far as I know, the problem is caused by isUserSignedIn() which checks if the session or the cachedSession are null, that is my problem right now.