Create base main page

This commit is contained in:
2023-06-09 11:19:40 +02:00
parent d55718f4de
commit 3ca941bd57
6 changed files with 166 additions and 1 deletions

View File

@@ -13,6 +13,14 @@ export class AuthApi {
static authStatus = atom(this.SignedIn);
/**
* Get user auth token
*/
static get AuthToken(): string {
if (!this.SignedIn) throw new Error("User is not authenticated!");
return sessionStorage.getItem(TokenStateKey)!;
}
/**
* Start OpenID login
*