Skip to content

Commit

Permalink
fix(utilities): set tokenExpiration to false if _tokenExpiresAt
Browse files Browse the repository at this point in the history
… is undefined
  • Loading branch information
JoaoPedroAS51 authored and pi0 committed Mar 15, 2020
1 parent 75e59a1 commit bbbd025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class TokenExpirationStatus {
} catch (error) {
// If the token is not jwt, we can't decode and refresh it, use _tokenExpiresAt value
if (error instanceof InvalidTokenError) {
tokenExpiration = _tokenExpiresAt
tokenExpiration = _tokenExpiresAt || false
}

throw error
Expand Down Expand Up @@ -198,7 +198,7 @@ export class TokenExpirationStatus {
} catch (error) {
// If the token is not jwt, we can't decode and refresh it, use _tokenExpiresAt value
if (error instanceof InvalidTokenError) {
refreshTokenExpiration = _tokenExpiresAt
refreshTokenExpiration = _tokenExpiresAt || false
}

throw error
Expand Down

0 comments on commit bbbd025

Please sign in to comment.