Skip to content

Commit

Permalink
fix audiences helper call scope
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jun 1, 2018
1 parent 911501a commit e728999
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/actions/grants/refresh_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -107,15 +107,15 @@ 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 = {
access_token: accessToken,
expires_in: expiresIn,
id_token: idToken,
refresh_token: refreshTokenValue,
scope: at.scope,
scope,
token_type: 'Bearer',
};

Expand Down

0 comments on commit e728999

Please sign in to comment.