Closed yxz0248 closed 5 years ago
// {app_root}/config/config.default.js
module.exports = config => {
const exports = {};
exports.oAuth2Server = {
debug: config.env === 'local',
grants: [ 'password' ],
};
return exports;
};
check your running environment really load the config
file
I have try egg-auth2-server as shown in test. But I got the error message : "Missing parameter:
grant_type
" with my request as follows:request(
${host}/user/token, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', Authorization: 'Basic bXlfYXBwOm15X3NlY3JldA==', }, data: { grant_type: 'password', username: 'egg-oauth2-server', password: 'azard', }, });
'oauth.js' and 'config.default.js' are the same as shown in test dir. Wish to get some help, thanks.