Skip to content

General-purpose OAuth 2.0 authentication strategy for eggjs.

Notifications You must be signed in to change notification settings

Xuhao/egg-passport-oauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

egg-passport-oauth2

NPM version build status

General-purpose OAuth 2.0 authentication strategy for eggjs, based on passport-oauth2.

Install

$ npm i egg-passport-oauth2 --save

Usage

// config/plugin.js
exports.passportOauth2 = {
  enable: true,
  package: 'egg-passport-oauth2',
};

Configuration

// config/config.default.js
exports.passportOauth2 = {
  provider: 'authCenter', // Optional, default is 'oauth2'
  key: '',
  secret: '',
  authorizationURL: 'https://www.example.com/oauth2/authorize',
  tokenURL: 'https://www.example.com/oauth2/token',
  callbackURL: 'http://localhost:3000/auth/authCenter/callback',
};

Checkout passport-oauth2 for more detail.

Questions & Suggestions

Please open an issue here.

License

MIT

About

General-purpose OAuth 2.0 authentication strategy for eggjs.

Resources

Stars

Watchers

Forks

Packages

No packages published