Commit dba8d891 authored by HJ's avatar HJ 🐼

fix

parent d551b398
......@@ -248,7 +248,7 @@ const checkOAuthToken = async ({ store }) => {
return new Promise(async (resolve, reject) => {
if (store.state.oauth.userToken) {
try {
await store.dispatch('loginUser', store.state.oauth.userToken)
await store.dispatch('loginUser', store.getters.getUserToken())
} catch (e) {
console.log(e)
}
......
......@@ -29,6 +29,11 @@ const oauth = {
// state.token is userToken with older name, coming from persistent state
// added here for smoother transition, otherwise user will be logged out
return state.userToken || state.token || state.appToken
},
getUserToken: state => () => {
// state.token is userToken with older name, coming from persistent state
// added here for smoother transition, otherwise user will be logged out
return state.userToken || state.token
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment