- Newest
- Most votes
- Most comments
Hi, to avoid this, customers usually us the Cognito pre-sign up trigger with a Lambda taking appropriate action based on requirements: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html
There is a good Github repo with sample code: https://github.com/vhalbuquerque/pre-signup-lambda
Best, Didier
Thank you for your response. While your solution to preventing duplicate entries in Amazon Cognito is helpful, our specific requirement involves handling social identity provider logins and ensuring a single user entry with multiple linked identities.
We've identified that our issue arises when a user registers with their email and later signs in using social identity providers like Google or Facebook.
So how we can resolve this ?
Hi,
According to the AWS documentation, you can link multiple identity providers (IdPs) to the same user profile in your Cognito directory, usually by automating the AdminLinkProviderForUser action on the pre-signup Lambda trigger, but you will always find both the linked local user and the automatically-created federated user when you search users in your user pool.
Relevant content
- Accepted Answerasked a month ago
- asked a year ago
- asked 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 9 months ago
Just mention that the provided example ensures that there are no duplicates entries in the user pool, but it does not allow a user to access with the same email from different identity providers.