diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-30 16:34:50 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-30 16:34:50 +0100 |
commit | 4912a0dbe7b1df1e884b53544943319f8f0c0ebb (patch) | |
tree | b091e8778debd4c4292ceb920265e02cb0ba5687 /web/pw-server/src/lib | |
parent | 522f4270e83a85564ecc977aa470fcf8560547e2 (diff) | |
download | planetwars.dev-4912a0dbe7b1df1e884b53544943319f8f0c0ebb.tar.xz planetwars.dev-4912a0dbe7b1df1e884b53544943319f8f0c0ebb.zip |
barebones authentication
Diffstat (limited to 'web/pw-server/src/lib')
-rw-r--r-- | web/pw-server/src/lib/auth.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/web/pw-server/src/lib/auth.ts b/web/pw-server/src/lib/auth.ts new file mode 100644 index 0000000..436ec66 --- /dev/null +++ b/web/pw-server/src/lib/auth.ts @@ -0,0 +1,7 @@ +export function set_session_token(token: string) { + window.localStorage.setItem('session', token); +} + +export function get_session_token(): string | null { + return window.localStorage.getItem('session'); +}
\ No newline at end of file |