/passport-examples

social auth for node

Primary LanguageJavaScriptMIT LicenseMIT

Social Authentication with Passport.js

Updated on November 27th, 2015 - Refactored and added Instagram Authentication

Final project:

fb

Quick Start

  1. Clone
  2. npm install
  3. Add oauth.js file to the root and add the social IDs and keys:
var ids = {
  facebook: {
    clientID: 'get_your_own',
    clientSecret: 'get_your_own',
    callbackURL: 'http://127.0.0.1:1337/auth/facebook/callback'
  },
  twitter: {
    consumerKey: 'get_your_own',
    consumerSecret: 'get_your_own',
    callbackURL: 'http://127.0.0.1:1337/auth/twitter/callback'
  },
  github: {
    clientID: 'get_your_own',
    clientSecret: 'get_your_own',
    callbackURL: 'http://127.0.0.1:1337/auth/github/callback'
  },
  google: {
    clientID: 'get_your_own',
    clientSecret: 'get_your_own',
    callbackURL: 'http://127.0.0.1:1337/auth/google/callback'
  },
  instagram: {
    clientID: 'get_your_own',
    clientSecret: 'get_your_own',
    callbackURL: 'http://127.0.0.1:1337/auth/instagram/callback'
  }
};

module.exports = ids;
  1. Run node app.js