Package: react-wallet-kit

Overview

Adds an OAuth provider to the user.
  • This function adds an OAuth provider (e.g., Google, Apple) to the user account.
  • If a userId is provided, it adds the provider for that specific user; otherwise, it uses the current session’s userId.
  • Automatically checks if an account already exists for the provided OIDC token and prevents duplicate associations.
  • If the user’s email is not set or not verified, attempts to update and verify the email using the email from the OIDC token.
  • Handles session management and error reporting for the add provider flow.
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).

Parameters

params
object
required

Response

A successful response returns the following fields:
returns
string[]
required
A promise that resolves to an array of provider IDs associated with the user.