Skip to content

Commit

Permalink
fix: handle server_error when refresh tokens are missing gty
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jan 22, 2019
1 parent ebbfffa commit 75046ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/actions/grants/refresh_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module.exports.handler = function getRefreshTokenHandler(provider) {
gty: refreshToken.gty,
});

if (!refreshToken.gty.endsWith(gty)) {
if (refreshToken.gty && !refreshToken.gty.endsWith(gty)) {
refreshToken.gty = `${refreshToken.gty} ${gty}`;
}

Expand Down Expand Up @@ -116,7 +116,7 @@ module.exports.handler = function getRefreshTokenHandler(provider) {
at.setS256Thumbprint(cert);
}

if (!at.gty.endsWith(gty)) {
if (at.gty && !at.gty.endsWith(gty)) {
at.gty = `${at.gty} ${gty}`;
}

Expand Down

0 comments on commit 75046ca

Please sign in to comment.