Skip to main content

useLogin() function

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

Hook to securely login to a backend with the connected wallet. The backend authentication URL must be configured on the ThirdwebProvider.

Signature:

export declare function useLogin(
config?: LoginConfig,
): (cfg?: LoginOptions) => Promise<void>;

Parameters

ParameterTypeDescription
configLoginConfig(Optional) Configuration for the login.

Returns:

(cfg?: LoginOptions) => Promise<void>

  • A function to invoke to login with the connected wallet.