useSession not reactive?

The useSession hook from the authentication client is not updating reactively. After the initial render, the isPending state remains true indefinitely, even after authentication is complete. The component only refreshes its state when there's a code change that forces a re-render.

const { data: session, isPending } = authClient.useSession();

Even after authentication is complete, the component doesn't update to show the user as logged in until the file is saved or another action triggers a re-render.
Was this page helpful?