## Cognito reusing access token between apps
Links:
- https://stackoverflow.com/questions/77324873/aws-cognito-is-it-possible-to-use-same-access-token-between-multiple-clients-in
- I am currently rewriting a legacy Django server with a Nest.js server and we are using AWS Cognito as identity provider but it seems like even though both servers are using the same User Pool ID, they are not accepting each other's access token as valid which would mean if we were to move our users from legacy server to Nest.js then all of the users would need to relogin to the app again which is not something we want of course. Is it possible to fix this? (I tried also both servers to use same client id but it did not helped)
- **THE ISSUE IS STILL NOT FIXED FOR THE AUTHOR**
- https://stackoverflow.com/questions/48295799/how-to-use-aws-cognito-to-share-session-across-apps-for-seamless-user-experience
- https://stackoverflow.com/questions/77698680/implementing-single-sign-on-sso-across-multiple-domains-with-aws-cognito-in-no
- https://djangostars.com/blog/bootstrap-django-app-with-cognito/
- Cognito Session checking middleware is possible but should be carefully tested for a performance and security issues
### User pool creation step
- https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-configuring-app-integration.html Next to Domain, choose Actions, and then select either Create custom domain or Create Amazon Cognito domain. If you have already configured a user pool domain, choose Delete Amazon Cognito domain or Delete custom domain before creating your new custom domain.
- This means that we can't use the same access_token because for each app we need a separate domain and a separate callback URL
- Maybe we can use `Amazon Cognito domain` for use for all apps