1 Answer
- Newest
- Most votes
- Most comments
0
Yes, Cognito cookies can be used to maintain user sessions in a public SPA client, but they are tied to the Cognito Hosted UI domain and are not a replacement for JWT-based session management. The cookies are set by Cognito managed login endpoints and are scoped to the custom domain (or the default *.auth.<region>.amazoncognito.com domain) of your user pool. They are automatically refreshed during login flows, but applications should still rely on the issued ID/Access/Refresh tokens for session handling.
https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-how-to-authenticate.html

Thanks for the information. Does AWS has any recommendation for storing tokens for clients that are registered as public SPA clients?