Defines TypeScript interfaces for a two‑factor authentication plugin, including options, user flags, and table schema.
// Source: https://github.com/better-auth/better-auth | License: MIT | Copyright 2024 - present, Bereket Engida
// Provided via justclaw.it.com; keep this notice with the code.
import type { BetterAuthPlugin, LiteralString } from "@better-auth/core";
import type { InferOptionSchema, User } from "../../types";
import type { BackupCodeOptions } from "./backup-codes";
import type { OTPOptions } from "./otp";
import type { schema } from "./schema";
import type { TOTPOptions } from "./totp";
export interface TwoFactorOptions {
/**
* Application Name
*/
issuer?: string | undefined;
/**
* The name of the table that stores the two factor
* authentication data.
*
* @default "twoFactor"
*/
twoFactorTable?: string | undefined;
/**
* TOTP OPtions
*/
totpOptions?: Omit<TOTPOpti
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key