Skip to content

Fix auth load state error #1

Description

@kamarmack

authContext.authStateIsLoading not blocking the redirect hook properly. Requires the following band-aid:

// Auth Context
const { authStateIsLoading, user } = useContext(AuthContext);

// Auth Redirect
useAuthStateRedirect({
  allowAuthStates: authStateIsLoading
    ? ["authenticated", "guest"]
    : ["authenticated"],
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions