Skip to content

options prop doesn't exist on the AuthLoader component leading to mismatched configuration between requests #38

@sina-byn

Description

@sina-byn

In my own usage of @tanstack/react-query I use a QueryCache() for the global configuration of the query client alongside some custom defined meta data fields on queries and mutations.

In one scenario I pass a field that indicates if a 401 error should redirect user to login or not based on the meta: {...} field of the useQuery or useMutation.

The problem I faced was once the <AuthLoader /> initiated the useUser hook the meta would be passed as undefined leading to unexpected results like unwanted redirects which was really hard to debug.

I suggest adding the optional options prop with the same type as the useUser options.


@alan2207

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