UNPKG

@better-auth-ui/core

Version:

Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.

49 lines (48 loc) 1.69 kB
import { PasskeyLocalization } from './passkey-localization'; export type PasskeyAuthenticatorAttachment = "platform" | "cross-platform"; export type PasskeyPluginOptions = { /** * Offer passkeys through the browser's autofill dropdown (WebAuthn * conditional UI) as soon as a sign-in form mounts, instead of waiting for * the user to press the passkey button. * * Requires the `webauthn` autocomplete token on the identifier field, which * the built-in sign-in forms add for you. * @default true */ autoFill?: boolean; /** * Request one authenticator type for passkey registration. Omit this option * to let the browser and operating system show all available choices. * * `"platform"` prefers this device. `"cross-platform"` prefers a security * key or another device. */ authenticatorAttachment?: PasskeyAuthenticatorAttachment; /** * Override the plugin's default localization strings. * @remarks `PasskeyLocalization` */ localization?: Partial<PasskeyLocalization>; }; export declare const passkeyPlugin: ((options?: PasskeyPluginOptions | undefined) => { autoFill: boolean; authenticatorAttachment: PasskeyAuthenticatorAttachment | undefined; localization: { passkey: string; addPasskey: string; deletePasskey: string; deletePasskeyTitle: string; deletePasskeyWarning: string; passkeys: string; passkeysDescription: string; noPasskeys: string; name: string; renamePasskey: string; renamePasskeySuccess: string; }; } & { id: "passkey"; }) & { id: "passkey"; };