UNPKG

payload-totp

Version:

Add an extra security layer to PayloadCMS using a Time-based One-time Password (TOTP).

14 lines (13 loc) 438 B
import type { TOTP } from 'otpauth'; import type { CollectionSlug, TypedUser } from 'payload'; export type PayloadTOTPConfig = { collection: CollectionSlug; disableAccessWrapper?: boolean; disabled?: boolean; forceSetup?: boolean; forceWhiteBackgroundOnQrCode?: boolean; totp?: Partial<Pick<TOTP, 'algorithm' | 'digits' | 'issuer' | 'period'>>; }; export type UserWithTotp = { hasTotp: boolean; } & TypedUser;