Skip to main content

useUser() function

This feature is currently in beta and may change based on feedback that we receive.

Hook to get the currently logged in user.

Signature:

export declare function useUser(): {
user: ThirdwebAuthUser | undefined;
isLoading: boolean;
};

Returns:

{ user: ThirdwebAuthUser | undefined; isLoading: boolean; }

  • The currently logged in user or null if not logged in, as well as a loading state.