Skip to content

Commit

Permalink
fix(refresh scheme): check if refresh token is defined before attempt…
Browse files Browse the repository at this point in the history
…ing to refresh
  • Loading branch information
JoaoPedroAS51 committed Mar 13, 2020
1 parent 2d09c29 commit 6673c23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/schemes/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export default class RefreshScheme extends LocalScheme {
// Refresh endpoint is disabled
if (!this.options.endpoints.refresh) return

// Token is required but not available
if (!this.$auth.getToken(this.name)) return
// Token and Refresh Token are required but not available
if (!this.$auth.getToken(this.name) || !this.$auth.getRefreshToken(this.name)) return

const { dataClientId, dataGrantType, grantType } = this.options
const endpoint = {
Expand Down

0 comments on commit 6673c23

Please sign in to comment.