forked from AkkomaGang/akkoma-fe
delete state.token instead of setting false
This commit is contained in:
parent
8a32731e4d
commit
bd377148ad
1 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import { delete as del } from 'vue'
|
||||||
|
|
||||||
const oauth = {
|
const oauth = {
|
||||||
state: {
|
state: {
|
||||||
clientId: false,
|
clientId: false,
|
||||||
|
@ -25,7 +27,9 @@ const oauth = {
|
||||||
},
|
},
|
||||||
clearToken (state) {
|
clearToken (state) {
|
||||||
state.userToken = false
|
state.userToken = false
|
||||||
state.token = false
|
// state.token is userToken with older name, coming from persistent state
|
||||||
|
// let's clear it as well, since it is being used as a fallback of state.userToken
|
||||||
|
del(state, 'token')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
|
Loading…
Reference in a new issue