Token login

This commit is contained in:
Philipp Heckel
2022-12-07 20:44:20 -05:00
parent 35657a7bbd
commit 8dcb4be8a8
11 changed files with 94 additions and 26 deletions

View File

@@ -9,6 +9,10 @@ class Session {
localStorage.removeItem("token");
}
exists() {
return this.username() && this.token();
}
username() {
return localStorage.getItem("user");
}