UNPKG

payload-totp-temp

Version:

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

18 lines (17 loc) 534 B
import type { TOTP } from 'otpauth'; import type { CheckboxField, CollectionSlug, User } from 'payload'; export type PayloadTOTPConfig = { collection: CollectionSlug; disableAccessWrapper?: boolean; disabled?: boolean; forceSetup?: boolean; totp?: Partial<Pick<TOTP, 'algorithm' | 'digits' | 'issuer' | 'period'>>; userSpecificForceTotpField?: { access?: CheckboxField['access']; enabled?: boolean; }; }; export type UserWithTotp = { forceTotp: boolean; hasTotp: boolean; } & User;