How to AutoLogin in multiple clients if logged in one client in Cognito?

579 Views Asked by At

My use case is where i have one cognito user pool and various client apps inside it. If i login in one of the application - i need to autoLogin in another application.

Things i tried

  • tried setting cookie Path to .domain so in another domain i can read those cookies (successful)
  • Reading that accessToken and getting user attributes (Successful)
  • Trying to get session object using amplify or cognito-identity-js. The idea is to authenticate via attributes decoded from JWT (Does not work, tried configuring Amplify multiple times, reading session or passing custom storage class. This code is written in getServerSideProps)

Any pointers/Alternatives in that directions ?

P.S - i would like to avoid AWS Lamda with custom triggers.

Thanks & Regards,

0

There are 0 best solutions below