Skip to content

Commit 02d14ac

Browse files
authored
fix: fix setUserToken issues (#528)
fixes #278
2 parents fb63f6f + 5d726b6 commit 02d14ac

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

lib/schemes/local.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,11 @@ export default class LocalScheme {
5555
}
5656

5757
async setUserToken (tokenValue) {
58-
// Ditch any leftover local tokens before attempting to log in
59-
await this._logoutLocally()
60-
61-
if (this.options.tokenRequired) {
62-
const token = this.options.tokenType
63-
? this.options.tokenType + ' ' + tokenValue
64-
: tokenValue
65-
66-
this.$auth.setToken(this.name, token)
67-
this._setToken(token)
68-
}
58+
const token = this.options.tokenType
59+
? this.options.tokenType + ' ' + tokenValue
60+
: tokenValue
61+
this.$auth.setToken(this.name, token)
62+
this._setToken(token)
6963

7064
return this.fetchUser()
7165
}

0 commit comments

Comments
 (0)