From 449704f0c7f4488be22a1a11a85a9afa632e59f4 Mon Sep 17 00:00:00 2001 From: Tatsuyuki Ishi Date: Wed, 30 May 2018 18:57:17 +0900 Subject: [PATCH] Bring back resetOnError --- lib/core/auth.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/core/auth.js b/lib/core/auth.js index a27e4ce40..f6931de38 100644 --- a/lib/core/auth.js +++ b/lib/core/auth.js @@ -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)