Skip to content

Commit 660e270

Browse files
authored
Merge pull request #2 from thomasballinger/loading-state
2 parents 2f83ebf + 95e3513 commit 660e270

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/ConvexClientProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function ConvexClientProvider({ children }: { children: ReactNode }) {
2020
function useAuthFromAuthKit() {
2121
const { user, loading: isLoading } = useAuth();
2222
const { accessToken, loading: tokenLoading, error: tokenError } = useAccessToken();
23-
const loading = (isLoading ?? false) || (tokenLoading ?? false);
23+
const loading = (isLoading ?? false) || (tokenLoading ?? false) || !accessToken;
2424
const authenticated = !!user && !!accessToken && !loading;
2525

2626
// Memoize the token to prevent unnecessary changes

0 commit comments

Comments
 (0)