1.0.2 • Published 1 year ago
egg-passport-google-multi v1.0.2
egg-passport-google-multi
google passport plugin for eggjs. only support OAuth 2.0, support multiple accounts.
Install
$ npm i egg-passport-google-multi --save
Usage
// config/plugin.js
exports.passportGoogleMulti: {
enable: true,
package: 'egg-passport-google-multi'
};
Configuration
// config/config.default.js
config.passportGoogleMulti = {
web1: {
key: "your oauth key1",
secret: "your oauth secret1",
},
web2: {
key: "your oauth key2",
secret: "your oauth secret2",
},
};
see config/config.default.js for more detail.
Router
app.passport.mount("google_web1", {
scope: ["email", "openid"],
prompt: "select_account",
});
app.passport.mount("google_web2", {
scope: ["email", "openid"],
prompt: "select_account",
});
Questions & Suggestions
Please open an issue here.