mirror of
https://github.com/documenso/documenso.git
synced 2026-07-25 17:35:05 +10:00
fix: move 2FA reason codes to shared constants to fix client bundle
Importing SIGNING_2FA_VERIFY_REASON_CODES from a server-only module pulled prisma into the browser bundle, causing "process is not defined" and breaking all client-side JS hydration.
This commit is contained in:
@@ -35,3 +35,12 @@ export const DOCUMENT_AUTH_TYPES: Record<string, DocumentAuthTypeData> = {
|
||||
value: msg`None (Overrides global settings)`,
|
||||
},
|
||||
} satisfies Record<TDocumentAuth, DocumentAuthTypeData>;
|
||||
|
||||
export const SIGNING_2FA_VERIFY_REASON_CODES = {
|
||||
TWO_FA_TOKEN_INVALID: 'TWO_FA_TOKEN_INVALID',
|
||||
TWO_FA_TOKEN_EXPIRED: 'TWO_FA_TOKEN_EXPIRED',
|
||||
TWO_FA_TOKEN_REVOKED: 'TWO_FA_TOKEN_REVOKED',
|
||||
TWO_FA_TOKEN_CONSUMED: 'TWO_FA_TOKEN_CONSUMED',
|
||||
TWO_FA_ATTEMPT_LIMIT_REACHED: 'TWO_FA_ATTEMPT_LIMIT_REACHED',
|
||||
TWO_FA_NOT_ISSUED: 'TWO_FA_NOT_ISSUED',
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user