We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
setUserToken
2 parents fb63f6f + 5d726b6 commit 02d14acCopy full SHA for 02d14ac
lib/schemes/local.js
@@ -55,17 +55,11 @@ export default class LocalScheme {
55
}
56
57
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
- }
+ const token = this.options.tokenType
+ ? this.options.tokenType + ' ' + tokenValue
+ : tokenValue
+ this.$auth.setToken(this.name, token)
+ this._setToken(token)
69
70
return this.fetchUser()
71
0 commit comments