From 7f4708c6969a48a2ff533a77f2aed02dd83dbb3f Mon Sep 17 00:00:00 2001 From: rr- Date: Sun, 3 Apr 2016 19:33:15 +0200 Subject: [PATCH] client/auth: keep cookie after auto auth failures ...remove it on any login attempt. --- client/js/controllers/auth_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/controllers/auth_controller.js b/client/js/controllers/auth_controller.js index 39a0c432..607a21ca 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 = {};