5
votes

I am trying to use the AWS Javascript sdk to provide login capabilities to a web app.

I have a Cognito User Pool set up and have accounts registering, verifying and logging in correctly.

Identities are being created in the identity pool, but I would now like to add functionality that allows me to authorize with my Google account (or facebook, twitter, whatever) and link that authorization to the same identity in the identity pool.

I can't find any method in the documentation that would allow me to do this.

I anticipate that this will allow my user to then login using Google or username/password, but I can't find any guidance on how to link those authorizations.

In addition, is there a way that the User Pool account can be created following a federated identity login, if that is the users initial point of contact (eg: clicking "Login with Facebook" when they have never been there before).

Any guidance would be greatly appreciated.

Best regards,

Hal

1

1 Answers

5
votes

You can find the documentation for google integration here: http://docs.aws.amazon.com/cognito/latest/developerguide/google.html#set-up-google-1.javascript

To summarize, in logins map you will need to pass both google token and the token from user pools. This will link both logins to a single identity. Now user can login with any one of them and user will have the same identity.

Yes it is possible to create user pool account later on.