Social networks integration using node js:
1. OAuth2
2. API consumption
3. everyauth vs. passport.js
the demo code can be found under my github repo - https://github.com/orkaplan/social-demo
5. • An authentication & authorization standard against third
party REST services
• Set a list of permission to access data and perform actions:
• Read user data
• Write to user data
• Delete user data
• Get user Location
• At the end of the process an access_token is obtained
8. • You don’t have to implement your own authentication
mechanism
• Save the security headache
• Save development time
• Use OAuth for 3rd party services to provide the
authentication mechanism for the product.
• Get access token and use it to fetch basic details about
the user.
• Examples:
• Asana leverages Google authentication in addition to its service.
• For Android use Google ID (google play API).
• Social plugins for Wordpress.
9.
10.
11. everyauth
.facebook
.appId(conf.fb.appId)
.appSecret(conf.fb.appSecret)
.findOrCreateUser( function (session, accessToken, accessTokenExtra,
fbUserMetadata) {
return this.promise();
var user = usersByFbId[fbUserMetadata.id] ||
(usersByFbId[fbUserMetadata.id] = addUser('facebook', fbUserMetadata));
promise.fulfill(user);
})
.redirectPath('/');