105. Load token from local storage (#12)
This commit is contained in:
@ -44,6 +44,10 @@ export class AuthenticationService {
|
||||
this.storage.setItem(JWT_TOKEN_STORAGE_KEY, token);
|
||||
}
|
||||
|
||||
public loadToken(): void {
|
||||
this.token = this.storage.getItem(JWT_TOKEN_STORAGE_KEY);
|
||||
}
|
||||
|
||||
public addUserToLocalStorage(user: User) {
|
||||
this.storage.setItem(USER_STORAGE_KEY, JSON.stringify(user));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user