2fa policy check working

This commit is contained in:
miloschwartz
2025-10-24 14:31:50 -07:00
parent ddcf77a62d
commit 629f17294a
16 changed files with 724 additions and 88 deletions

View File

@@ -1,12 +1,20 @@
import { Org, User } from "@server/db";
type CheckOrgAccessPolicyProps = {
export type CheckOrgAccessPolicyProps = {
orgId?: string;
org?: Org;
userId?: string;
user?: User;
};
export type CheckOrgAccessPolicyResult = {
allowed: boolean;
error?: string;
policies?: {
requiredTwoFactor?: boolean;
};
};
export async function checkOrgAccessPolicy(
props: CheckOrgAccessPolicyProps
): Promise<{