mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 12:32:34 +10:00
32 lines
833 B
TypeScript
32 lines
833 B
TypeScript
import type { TDocumentAuth } from '../types/document-auth';
|
|
import { DocumentAuth } from '../types/document-auth';
|
|
|
|
type DocumentAuthTypeData = {
|
|
key: TDocumentAuth;
|
|
value: string;
|
|
|
|
/**
|
|
* Whether this authentication event will require the user to halt and
|
|
* redirect.
|
|
*
|
|
* Defaults to false.
|
|
*/
|
|
isAuthRedirectRequired?: boolean;
|
|
};
|
|
|
|
export const DOCUMENT_AUTH_TYPES: Record<string, DocumentAuthTypeData> = {
|
|
[DocumentAuth.ACCOUNT]: {
|
|
key: DocumentAuth.ACCOUNT,
|
|
value: 'Require account',
|
|
isAuthRedirectRequired: true,
|
|
},
|
|
[DocumentAuth.PASSKEY]: {
|
|
key: DocumentAuth.PASSKEY,
|
|
value: 'Require passkey',
|
|
},
|
|
[DocumentAuth.EXPLICIT_NONE]: {
|
|
key: DocumentAuth.EXPLICIT_NONE,
|
|
value: 'None (Overrides global settings)',
|
|
},
|
|
} satisfies Record<TDocumentAuth, DocumentAuthTypeData>;
|