express-any-oauth

1.0.1 • Public • Published

Express OAuth Any

OAuth implementations for most popular OAuth providers

Supported OAuth Providers

Implemented :

  • Twitter

Coming soon (Help requested) :

  • GitHub
  • Google
  • Facebook
  • Microsoft
  • Apple
  • Amazon
  • LinkedIn

Installation

Dependencies

express and express-session

Install

$ npm install express-oauth-any

Add the following to app.js

  var { registerOauth } = require('express-oauth-any');
  app.use(session({ secret: "yoursecret"}))
  registerOauth(app, options);

Options

Options should include the platforms for which you need oauth enabled

  options = {
      twitter: {
          key: "YOUR CONSUMER KEY", 
          secret: "YOUR CONSUMER SECRET"
      }
  }

Usage

Once installed, call the following url to invoke the login process <a href="/oauth-any/twitter/login?state=/profile"> Login with Twitter </a>

Once the login is successful, user will be redirected to the url determined by state and login information will be available in req.session[PLAFTOMRM], e.g. req.session.twitter

Twitter

  options = {
      twitter: {
          key: "YOUR CONSUMER KEY", 
          secret: "YOUR CONSUMER SECRET"
      }
  }

Requested help

Please help me implement the various OAuth Providers listed here so that others don't have to

Readme

Keywords

none

Package Sidebar

Install

npm i express-any-oauth

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

3.61 kB

Total Files

4

Last publish

Collaborators

  • madhavanmalolan