Fix oversight to store userId as user.username for auth codes

This commit is contained in:
Johannes Zellner
2016-04-13 10:45:11 +02:00
parent 95de25560b
commit 40bee79e3d
+1 -1
View File
@@ -57,7 +57,7 @@ gServer.grant(oauth2orize.grant.code({ scopeSeparator: ',' }, function (client,
var code = hat(256);
var expiresAt = Date.now() + 60 * 60000; // 1 hour
authcodedb.add(code, client.id, user.username, expiresAt, function (error) {
authcodedb.add(code, client.id, user.id, expiresAt, function (error) {
if (error) return callback(error);
debug('grant code: new auth code for client %s code %s', client.id, code);