Skip to content

krishnakishorep/SocialAggregatorUsingOAUTH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

SocialAggregator-OAUTH

This is a simple webpage to demostrate the OAUTH setup using Passport

Following libraries are used to setup the sample application:

  • Used Express library
  • Used EJS for quickly building front end with JS
  • Used passport library to manage the OAUTH process
  • Used following strategies library for login
    • passport-facebook
    • passport-google-oauth
    • passport-twitter
  • Used Mongoose to save the users using User schema model

Steps involved

  • Configuring passport
    • Setup passport using NPM command
    • Import passport into express (app.js)
    • Do initialize(), session(), serializeUser() and deserializeUser()
    • import all three strategies (google, twitter and facebook )
  • Pre setup for authorization to get ClientID, Secret and setup Callback/Redirect URL
  • Configuring the strategies
    • Refer to Facebook.strategy.js
    • Refer to Google.strategy.js
    • Refer to Twitter.strategy.js

Login

image

Consent

image

Redirect Page

image

After logged in via Facebook and Twitter

image

User record in MongoDB

image

About

Java Script Projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors