I am trying to adapt it, sign up with Google (OAuth) or with Cognito (email + password).
My issue is that if I sign up with Google and then Cognito, I create a duplicate in my User Pool. Also, if I sign up with Cognito and then Google, it also create a duplicate in my User Pool.
However, if I try to sign up twice with Cognito, it would notice the email already exist.
I am trying to find a good way to prevent those duplicate, or by raising an error or by merging the duplicate but I have not found out, would you have suggestions?
Hi Nader,
Thank you for this article, it helped me a lot.
I am trying to adapt it, sign up with Google (OAuth) or with Cognito (email + password).
My issue is that if I sign up with Google and then Cognito, I create a duplicate in my User Pool. Also, if I sign up with Cognito and then Google, it also create a duplicate in my User Pool.
However, if I try to sign up twice with Cognito, it would notice the email already exist.
I am trying to find a good way to prevent those duplicate, or by raising an error or by merging the duplicate but I have not found out, would you have suggestions?
Thank you
If you use Auth.federatedSignIn({provider: 'Google'}), you don't have to use anything else.
Why twice ?
Hi rudyhadoux,
If you sign in with Facebook and Google with same email, it creates two identities.
Thanks.
Two Cognito identities with the same email ?
Is it possible ?
Hi Adrien,
Did you find a solution to this problem?
Thanks.