Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Social Login Always Create New Users #190

Open
rhidajat opened this issue Mar 10, 2019 · 2 comments
Open

Social Login Always Create New Users #190

rhidajat opened this issue Mar 10, 2019 · 2 comments

Comments

@rhidajat
Copy link

rhidajat commented Mar 10, 2019

I have existing users in my user pool and now I want to allow them to sign in using social Login, in this case Google. My problem is that whenever users signs in with their Google account, cognito does not map the google email address to existing user with that email address, thus it will create a different user altogether.

Can anyone confirm that Cognito does not support mapping to existing users? Or am I missing something here?

I have set the Attribute Mapping to map Google's email to Cognito's email field.

@mymattcarroll
Copy link

You can use CognitoIdentityServiceProvider.adminLinkProviderForUser: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#adminLinkProviderForUser-property

@rhidajat
Copy link
Author

@mymattcarroll, thanks for the pointer! I am gonna give it a try!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants