diff options
| author | rr- | 2016-04-03 19:33:15 +0200 |
|---|---|---|
| committer | rr- | 2016-04-03 19:33:48 +0200 |
| commit | 7f4708c6969a48a2ff533a77f2aed02dd83dbb3f (patch) | |
| tree | 26957abc3ed369349ebd177c0bdb5c83925ed110 /client/js/controllers/auth_controller.js | |
| parent | 2578a297bfc95b165401436110d0d810df4ed4b2 (diff) | |
client/auth: keep cookie after auto auth failures
...remove it on any login attempt.
Diffstat (limited to 'client/js/controllers/auth_controller.js')
| -rw-r--r-- | client/js/controllers/auth_controller.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/js/controllers/auth_controller.js b/client/js/controllers/auth_controller.js index 39a0c43..607a21c 100644 --- a/client/js/controllers/auth_controller.js +++ b/client/js/controllers/auth_controller.js @@ -13,7 +13,6 @@ class AuthController { const auth = cookies.getJSON('auth'); if (auth && auth.user && auth.password) { api.login(auth.user, auth.password).catch(errorMessage => { - cookies.remove('auth'); page('/'); this.loginView.notifyError( 'An error happened while trying to log you in: ' + @@ -27,6 +26,7 @@ class AuthController { this.loginView.render({ login: (name, password, doRemember) => { return new Promise((resolve, reject) => { + cookies.remove('auth'); api.login(name, password) .then(() => { const options = {}; |