Skip to main content

WalletAuthenticator.login() method

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Login With Connected Wallet

Example

// Add the domain of the application users will login to, this will be used throughout the login process
const domain = "example.com";
// Generate a signed login payload for the connected wallet to authenticate with
const loginPayload = await sdk.auth.login(domain);

Signature:

login(domain: string, options?: LoginOptions): Promise<LoginPayload>;

Parameters

ParameterTypeDescription
domainstringThe domain of the server-side application to login to
optionsLoginOptions(Optional) Optional configuration options for the login request

Returns:

Promise<LoginPayload>

Login payload that can be used on the server-side to verify the login request or authenticate

Remarks

Client-side function that allows the connected wallet to login to a server-side application. Generates a login payload that can be sent to the server-side for verification or authentication.