diff --git a/lib/schemes/local.js b/lib/schemes/local.js index d05d882f4..38316d313 100644 --- a/lib/schemes/local.js +++ b/lib/schemes/local.js @@ -34,6 +34,9 @@ export default class LocalScheme { return } + // Ditch any leftover local tokens before attempting to log in + await this._logoutLocally() + const result = await this.$auth.request( endpoint, this.options.endpoints.login @@ -81,6 +84,10 @@ export default class LocalScheme { } // But logout locally regardless + return this._logoutLocally() + } + + async _logoutLocally () { if (this.options.tokenRequired) { this._clearToken() }