AWS.config.credentials are zeros between page requests

I use Facebook to create an authenticated identity using AWS Cognito that everything is working fine and that I can log in and synchronize the data.

However, if I move away from my login page but stay on my site, the AWS.config.credentials base object will be zero, and I cannot sync data using another page.

I suspect that I am missing something obvious, but I don’t see it from Amazon documents and I don’t know what!

Edit: Sorry - had to add - this is through the Javascript SDK

+3
source share
1 answer

Only an identifier is supported between pages, credentials are not. You will need to cache the Facebook token and provide it with a credential object when navigating between pages to obtain AWS credentials. You will also need to track the expiration of the Facebook token in order to update the cache key if it expired. This forum post contains more information about the process. https://forums.aws.amazon.com/thread.jspa?threadID=179420&tstart=25

+3
source

All Articles