Authenticating with Facebook, Google, and Twitter

Adding new social strategies is very similar to what we did with the local strategy. The main difference with the social strategies is that we need to register our app on each of the platforms, and of course, have an account on each one of them.

Facebook

We need to go to the Facebook Developers site (https://developers.facebook.com) to register the app. Go to My Apps | Settings | Basic, and get App ID and App Secret. We also need to the site URL to http://localhost:9000/.

Facebook

In case you need to set up the callback URL you can use http://localhost:9000/auth/facebook/callback.

Once you have the ID and secret, ...

Get Web Application Development with MEAN now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.