简体   繁体   中英

AWS Cognito multi-user sign in like gmail

I want to be able to sign into multiple accounts at the same time (think of how gmail lets you swap between signed in accounts). Is this possible/supported using Cognito? (I only need to be able to use one at a time)

Further, is there a way that I can give the user a challenge when swapping to another account such as a pin code (dumbing down my use case here).

This whole managed user accounts thing is very different to more traditional apps given that the authentication is no longer done on my server side... except for the challenge. Is it possible to mix the server/non-server based cognito authentication like this?

I'm going serverless with lambda and typescript.

Some guidance on how I could achieve this would be much appreciated

Suppose you have 2 applications and if both of them are authenticated using the same userpool, then I don't see an issue in this. All you need to do is store the access id post authentication in the Application 1 and look its validity before allowing the same user to use Application 2, which in turn is using the same userpool.

I believe that you can achieve the challenge usecase by customizing the userpool workflow using the pre-authentication lambda.

Customizing User Pool Using Lambdas

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM