UNPKG

payload-totp

Version:

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

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