mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 00:32:43 +10:00
Adds password reauthentication to our existing reauth providers, additionally swaps from an exclusive provider to an inclusive type where multiple methods can be selected to offer a this or that experience.
31 lines
836 B
TypeScript
31 lines
836 B
TypeScript
import type { TDocumentAuth } from '../types/document-auth';
|
|
import { DocumentAuth } from '../types/document-auth';
|
|
|
|
type DocumentAuthTypeData = {
|
|
key: TDocumentAuth;
|
|
value: string;
|
|
};
|
|
|
|
export const DOCUMENT_AUTH_TYPES: Record<string, DocumentAuthTypeData> = {
|
|
[DocumentAuth.ACCOUNT]: {
|
|
key: DocumentAuth.ACCOUNT,
|
|
value: 'Require account',
|
|
},
|
|
[DocumentAuth.PASSKEY]: {
|
|
key: DocumentAuth.PASSKEY,
|
|
value: 'Require passkey',
|
|
},
|
|
[DocumentAuth.TWO_FACTOR_AUTH]: {
|
|
key: DocumentAuth.TWO_FACTOR_AUTH,
|
|
value: 'Require 2FA',
|
|
},
|
|
[DocumentAuth.PASSWORD]: {
|
|
key: DocumentAuth.PASSWORD,
|
|
value: 'Require password',
|
|
},
|
|
[DocumentAuth.EXPLICIT_NONE]: {
|
|
key: DocumentAuth.EXPLICIT_NONE,
|
|
value: 'None (Overrides global settings)',
|
|
},
|
|
} satisfies Record<TDocumentAuth, DocumentAuthTypeData>;
|