oauthWithPopup

Initiates an OAuth authentication flow in a popup window and returns the authenticated user.

Import

1import { AlchemySignerWebClient } from "@account-kit/signer";

Usage

1import { AlchemySignerWebClient } from "@account-kit/signer";
2
3const client = new AlchemySignerWebClient({
4 connection: {
5 apiKey: "your-api-key",
6 },
7 iframeConfig: {
8 iframeContainerId: "signer-iframe-container",
9 },
10});
11
12const user = await client.oauthWithPopup({
13 type: "oauth",
14 authProviderId: "google",
15 mode: "popup",
16});

Parameters

args

Extract<AuthParams, { type: "oauth"; mode: "popup" }> The authentication parameters specifying OAuth type and popup mode

Returns

Promise<User> A promise that resolves to a User object containing the authenticated user information