From e728999921700df5cf9f94e1f68c4eb600f2c9e8 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Fri, 1 Jun 2018 13:37:21 +0200 Subject: [PATCH] fix audiences helper call scope --- lib/actions/grants/refresh_token.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/actions/grants/refresh_token.js b/lib/actions/grants/refresh_token.js index 61fa1bf94..0e2cf50a8 100644 --- a/lib/actions/grants/refresh_token.js +++ b/lib/actions/grants/refresh_token.js @@ -93,7 +93,7 @@ module.exports.handler = function getRefreshTokenHandler(provider) { ctx.oidc.entity('AccessToken', at); const { expiresIn } = AccessToken; - const token = new IdToken(Object.assign({}, await account.claims('id_token', at.scope), { + const token = new IdToken(Object.assign({}, await account.claims('id_token', scope), { acr: refreshToken.acr, amr: refreshToken.amr, auth_time: refreshToken.authTime, @@ -107,7 +107,7 @@ module.exports.handler = function getRefreshTokenHandler(provider) { token.set('sid', refreshToken.sid); const idToken = await token.sign(ctx.oidc.client, { - audiences: await audiences(ctx, refreshToken.accountId, refreshToken, 'id_token', 'scope'), + audiences: await audiences(ctx, refreshToken.accountId, refreshToken, 'id_token', scope), }); ctx.body = { @@ -115,7 +115,7 @@ module.exports.handler = function getRefreshTokenHandler(provider) { expires_in: expiresIn, id_token: idToken, refresh_token: refreshTokenValue, - scope: at.scope, + scope, token_type: 'Bearer', };