mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
14 lines
371 B
TypeScript
14 lines
371 B
TypeScript
import type { User } from '@prisma/client';
|
|
|
|
import { DOCUMENSO_ENCRYPTION_KEY } from '../../constants/crypto';
|
|
|
|
type IsTwoFactorAuthenticationEnabledOptions = {
|
|
user: User;
|
|
};
|
|
|
|
export const isTwoFactorAuthenticationEnabled = ({
|
|
user,
|
|
}: IsTwoFactorAuthenticationEnabledOptions) => {
|
|
return user.twoFactorEnabled && typeof DOCUMENSO_ENCRYPTION_KEY === 'string';
|
|
};
|