feat: created reusable mfa flow

This commit is contained in:
Sheen Capadngan
2024-10-17 02:01:22 +08:00
parent 8da2213bf1
commit 9192c5caa2
6 changed files with 240 additions and 58 deletions
@@ -18,6 +18,7 @@ export type TAuthMode =
user: TUsers;
orgId: string;
authMethod: AuthMethod;
isMfaVerified?: boolean;
}
| {
authMode: AuthMode.API_KEY;
@@ -121,7 +122,8 @@ export const injectIdentity = fp(async (server: FastifyZodProvider) => {
tokenVersionId,
actor,
orgId: orgId as string,
authMethod: token.authMethod
authMethod: token.authMethod,
isMfaVerified: token.isMfaVerified
};
break;
}