Skip to content

Commit

Permalink
Bring back resetOnError
Browse files Browse the repository at this point in the history
  • Loading branch information
ishitatsuyuki authored May 30, 2018
1 parent 2df6a64 commit 449704f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/core/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ export default class Auth {
}

async init () {
// Reset on error
if (this.options.resetOnError) {
this.onError(() => {
this.reset()
})
}

// Restore strategy
this.$storage.syncUniversal('strategy', this.options.defaultStrategy)

Expand Down

0 comments on commit 449704f

Please sign in to comment.