Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ export function AuthKitProvider(props: AuthKitProviderProps) {
getSignUpUrl: client.getSignUpUrl.bind(client),
});
setState((prev) => ({ ...prev, isLoading: false, user }));
})
.catch(() => {
setState((prev) => ({ ...prev, isLoading: false }));
});
Comment on lines +97 to 99
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Silent error swallowing makes failures invisible

The .catch() handler discards the rejection entirely — no logging, no exposed error state. When createClient fails due to a misconfigured apiHostname, DNS error, or network timeout, the app silently moves to the unauthenticated state with zero diagnostic signal. In production this makes the root cause nearly impossible to identify without additional instrumentation.

});

Expand Down
Loading