-
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #434 from M2K3K5/automatic-user-oauth
feature: automatic OAuth login and session expiration check with redirect to login page
- Loading branch information
Showing
6 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
interface KeyValueStorage { | ||
get(key: string): string | undefined; | ||
set(key: string, value: string): void; | ||
delete(key: string): void; | ||
} | ||
|
||
export const LocalStorage: KeyValueStorage = { | ||
get(key: string) { | ||
return localStorage.getItem(key) ?? undefined; | ||
}, | ||
set(key: string, value: string) { | ||
localStorage.setItem(key, value); | ||
}, | ||
delete(key: string) { | ||
localStorage.removeItem(key); | ||
}, | ||
}; | ||
|
||
export const REMEMBER_ME_KEY = "remember-me"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters