oauthjs / node-oauth2-server

Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js

Home Page:https://npmjs.org/package/oauth2-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug generateAuthorizationCode

ltduc opened this issue · comments

commented

Hi, Team!

When NodeJS i implement model generateAuthorizationCode Then bug:
generateAuthorizationCode: (client, user, scope) => {
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

}

Please attach the errors here

Happy to say this has been fixed in 46bc95e and released in 3.1.0