client/auth: keep cookie after auto auth failures
...remove it on any login attempt.
This commit is contained in:
parent
2578a297bf
commit
7f4708c696
1 changed files with 1 additions and 1 deletions
|
@ -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 = {};
|
||||
|
|
Loading…
Reference in a new issue