We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just open model.js on line 111 change function to:
` generateAuthorizationCode: (client, user, scope,cb) => {
log({ title: 'Generate Authorization Code', parameters: [ { name: 'client', value: client }, { name: 'user', value: user }, ], }) const seed = crypto.randomBytes(256) const code = crypto .createHash('sha1') .update(seed) .digest('hex') cb(null,code)
},`
The text was updated successfully, but these errors were encountered:
Another fix to be compatible with both callback-style and promise-style invocations :
generateAuthorizationCode: function (client, user, scope, callback) { const generateCode = () => { log({ title: 'Generate Authorization Code', parameters: [ { name: 'client', value: client }, { name: 'user', value: user }, ], }); const seed = crypto.randomBytes(256); const code = crypto .createHash('sha1') .update(seed) .digest('hex'); return code; }; if (callback && typeof callback === 'function') { try { const code = generateCode(); callback(null, code); } catch (error) { callback(error); } } else { return new Promise((resolve, reject) => { try { const code = generateCode(); resolve(code); } catch (error) { reject(error); } }); } },
Sorry, something went wrong.
No branches or pull requests
Just open model.js on line 111 change function to:
` generateAuthorizationCode: (client, user, scope,cb) => {
},`
The text was updated successfully, but these errors were encountered: