Skip to content

Commit

Permalink
fix(schemes): check if clientId is defined before attempting to res…
Browse files Browse the repository at this point in the history
…et it
  • Loading branch information
JoaoPedroAS51 committed Mar 16, 2020
1 parent a4ab3da commit b68de9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/schemes/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ export default class LocalScheme {
}

async reset () {
this._setClientId(false)
if (this.options.clientId) {
this._setClientId(false)
}

this.$auth.setUser(false)
this.$auth.token.reset()

Expand Down
5 changes: 4 additions & 1 deletion lib/schemes/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ export default class RefreshScheme extends LocalScheme {
}

async reset () {
this._setClientId(false)
if (this.options.clientId) {
this._setClientId(false)
}

this.$auth.setUser(false)
this.$auth.token.reset()
this.$auth.refreshToken.reset()
Expand Down

0 comments on commit b68de9f

Please sign in to comment.