Skip to content

Bug: Incorrect loading state in ConvexClientProvider #5

@davidgrrcia

Description

@davidgrrcia

Problem:
In the useAuthFromAuthKit hook, the loading state includes !accessToken, which causes isLoading to stay true even after loading completes if the token is missing:
const loading = (isLoading ?? false) || (tokenLoading ?? false) || !accessToken;

Image

Fix:
Using the Convex auth provider code from the official Convex documentation fixes this issue by setting loading as:
const loading = (isLoading ?? false) || (tokenLoading ?? false);

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions