authenticate

Authenticates the user based on the provided authentication arguments.

Example

import { authenticate } from "thirdweb/wallets/in-app";
const result = await authenticate({
client,
strategy: "email",
email: "example@example.org",
verificationCode: "123456",
});
function authenticate(
args: OneOf<
| AuthArgsType
| {
client: ThirdwebClient;
ecosystem?: Ecosystem;
redirect: boolean;
strategy:
| "google"
| "apple"
| "facebook"
| "discord"
| "line"
| "x"
| "coinbase"
| "farcaster"
| "telegram";
}
>,
): Promise<void | AuthLoginReturnType>;

Parameters

The authentication arguments.

Type

let args: OneOf<
| AuthArgsType
| {
client: ThirdwebClient;
ecosystem?: Ecosystem;
redirect: boolean;
strategy:
| "google"
| "apple"
| "facebook"
| "discord"
| "line"
| "x"
| "coinbase"
| "farcaster"
| "telegram";
}
>;

Returns

let returnType: Promise<void | AuthLoginReturnType>;

A promise that resolves to the authentication result.