@zhaochy/egg-oauth2-server
Version:
koa-oauth-server(node-oauth2-server) plugin for egg
25 lines (22 loc) • 411 B
JavaScript
;
module.exports = config => {
const exports = {};
/**
* @see https://www.npmjs.com/package/oauth2-server
*/
exports.oAuth2Server = {
debug: config.env === 'local',
grants: [ 'password' ],
whiteList: [
'/auth/login',
'/auth/logout',
],
jwt: {
secret: 'thisismysecret',
},
sign: {
algorithm: 'RS256',
},
};
return exports;
};