Search code examples
amazon-cognitoaws-amplify

Amazon Cognito SSO - how to logout from all apps once logged out one of them


I'm using Amazon Cognito Google sign-in in order to have a common login across multiple subdomains. Login works as expected I'm getting tokens after login. But I'm not sure how to logout the user from all portals once it is signed out from one of them. I can check https://domain.auth.<regin>.amazoncognito.com/oauth2/userInfo endpoint for each request, but I think it will affect performance significantly. Is there any other way to achieve this?

I would appreciate any other SSO solution that good fit my case.


Solution

  • I figured out the answer by myself. The idea behind SSO it that access token should be verified on each request by SSO server - Cognito in my case.

    I decided to create my own service for authentication which will share a cookie with JWT token between subdomains. Any of the services will be redirected to the auth service and sign in there once couldn't find the dedicated cookie