getLastAuthProvider

Retrieves the last authentication provider used from local storage.

This function is designed to work only in a browser environment.

Example

import { getLastAuthProvider } from "thirdweb/react";
const lastAuthProvider = await getLastAuthProvider();
function getLastAuthProvider(): Promise<
| null
| OAuthOption
| "email"
| "phone"
| "passkey"
| "wallet"
| "jwt"
| "auth_endpoint"
| "iframe_email_verification"
| "iframe"
>;

Returns

let returnType: Promise<
| null
| OAuthOption
| "email"
| "phone"
| "passkey"
| "wallet"
| "jwt"
| "auth_endpoint"
| "iframe_email_verification"
| "iframe"
>;

A promise that resolves to the last authentication provider strategy used, or null if none is found.