Skip to content

Commit 882c883

Browse files
committed
Fixed login is authenticated checks
1 parent b7a4e42 commit 882c883

File tree

1 file changed

+7
-1
lines changed
  • src/Exceptionless.Web/ClientApp/src/lib/api

1 file changed

+7
-1
lines changed

src/Exceptionless.Web/ClientApp/src/lib/api/auth.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ import { globalFetchClient } from './FetchClient';
88

99
import type { Login, TokenResult } from '$lib/models/api';
1010

11-
export const accessToken = persisted<string | null>('satellizer_token', null);
11+
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+
1218
export const isAuthenticated = derived(accessToken, ($accessToken) => $accessToken !== null);
1319
export const enableAccountCreation = env.PUBLIC_ENABLE_ACCOUNT_CREATION === 'true';
1420
export const facebookClientId = env.PUBLIC_FACEBOOK_APPID;

0 commit comments

Comments
 (0)