diff options
| author | Roger Braun <roger@rogerbraun.net> | 2017-07-02 13:07:35 +0200 |
|---|---|---|
| committer | eal <eal@waifu.club> | 2017-09-02 19:50:02 +0300 |
| commit | 8b4f59e1f76c605e8039809fc10066927d6dd5ad (patch) | |
| tree | c2e0fae9aeeaaf50278d6318b32fb63bbfd1f9d0 /src/lib/persisted_state.js | |
| parent | 87b18da8116bcaf8bb2f154847fb9f0fed58789a (diff) | |
Try logging in with the existing cookie.
Diffstat (limited to 'src/lib/persisted_state.js')
| -rw-r--r-- | src/lib/persisted_state.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/persisted_state.js b/src/lib/persisted_state.js index 02349e13..09b5e987 100644 --- a/src/lib/persisted_state.js +++ b/src/lib/persisted_state.js @@ -51,6 +51,9 @@ export default function createPersistedState ({ merge({}, store.state, savedState) ) } + if (store.state.users.lastLoginName) { + store.dispatch('loginUser', {username: store.state.users.lastLoginName, password: 'xxx'}) + } loaded = true } catch (e) { console.log("Couldn't load state") |
