We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7a4e42 commit 882c883Copy full SHA for 882c883
src/Exceptionless.Web/ClientApp/src/lib/api/auth.ts
@@ -8,7 +8,13 @@ import { globalFetchClient } from './FetchClient';
8
9
import type { Login, TokenResult } from '$lib/models/api';
10
11
-export const accessToken = persisted<string | null>('satellizer_token', null);
+export const accessToken = persisted<string | null>('satellizer_token', null, {
12
+ serializer: {
13
+ parse: (s) => (s === 'null' ? null : s),
14
+ stringify: (s) => s as string
15
+ }
16
+});
17
+
18
export const isAuthenticated = derived(accessToken, ($accessToken) => $accessToken !== null);
19
export const enableAccountCreation = env.PUBLIC_ENABLE_ACCOUNT_CREATION === 'true';
20
export const facebookClientId = env.PUBLIC_FACEBOOK_APPID;
0 commit comments