mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
client/api: fix removing cookies on login failures
This commit is contained in:
@ -88,7 +88,6 @@ class Api {
|
||||
}
|
||||
|
||||
login(userName, userPassword, doRemember) {
|
||||
cookies.remove('auth');
|
||||
return new Promise((resolve, reject) => {
|
||||
this.userName = userName;
|
||||
this.userPassword = userPassword;
|
||||
@ -114,13 +113,16 @@ class Api {
|
||||
}
|
||||
|
||||
logout() {
|
||||
cookies.remove('auth');
|
||||
this.user = null;
|
||||
this.userName = null;
|
||||
this.userPassword = null;
|
||||
events.notify(events.Authentication);
|
||||
}
|
||||
|
||||
forget() {
|
||||
cookies.remove('auth');
|
||||
}
|
||||
|
||||
isLoggedIn() {
|
||||
return this.userName !== null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user