Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add facebook login sign-in #26

Conversation

jatazoulja
Copy link

Cognito Setting:

  1. navigate to your cognito userpool then navigate to App Integration > Domain name and add your subdomain:

screen shot 2018-02-13 at 9 48 34 am

2. navigate to your cognito userpool then navigate to Federation > Identity Provider: (Please note that you should provide your fb api key and secret key from https://developer.facebook.com)

screen shot 2018-02-13 at 9 50 13 am

3. Map your facebook attribute to cognito attribute: (this are some of the recommended settings)

screen shot 2018-02-13 at 11 15 17 am

Facebook Setting:

  1. add a new app.
  2. choose Facebook Login and then pick "web"
  3. at the first step add your url then save and continue.

screen shot 2018-02-13 at 8 06 19 pm

4. disregard the rest of the step. 5. Go to your facebook login setting and add a valid Oauth redirect url: https://.auth..amazoncognito.com/oauth2/idpresponse

screen shot 2018-02-13 at 9 52 48 am

NOTE: you can get your app key and secret key at the dashboard setting:
screen shot 2018-02-13 at 8 08 06 pm

@jayair
Copy link
Member

jayair commented Feb 17, 2018

@jatazoulja Thanks! This is really helpful. I cannot merge this PR but I'm going to link to this in our newsletter and in the tutorial.

@jatazoulja
Copy link
Author

Sure have it as reference... BTW do you have plans to update to aws amplify? I hears cognito-identity-js will be discontinued and will be part of amplify...

Cheers

@jayair
Copy link
Member

jayair commented Feb 17, 2018

@jatazoulja Yeah we are in talks with the Amplify team to update Serverless Stack with it. Should have some announcements soon.

@jatazoulja
Copy link
Author

Great! Looking forward to it!

@peetss
Copy link

peetss commented Aug 9, 2018

@jayair Why can't we merge this?

@jatazoulja
Copy link
Author

@peetss I believe this is an old code. if you want to use it you can follow the instruction, and I believe this is pre aws-amplify version.
I do have another version: #31

Note on this PR:
this PR uses cognito custom UI. that requires callback (I don't see that callback on the latest aws-amplify yet).
Pros: it uses cognito user pool and you can track user for social oAuth to your pool.

Cheers.

@jayair
Copy link
Member

jayair commented Sep 18, 2018

We just published a chapter based on @jatazoulja's new PR - https://serverless-stack.com/chapters/facebook-login-with-cognito-using-aws-amplify.html. Closing this!

@jayair jayair closed this Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants