Skip code verification for admin (#13278)

This commit is contained in:
Hariom Balhara
2024-01-17 13:21:30 +00:00
committed by GitHub
parent 8467a9c53b
commit 396b81af58
@@ -26,6 +26,12 @@ export const verifyCodeHandler = async ({ ctx, input }: VerifyCodeOptions) => {
logger.warn(`Skipping code verification in dev/E2E environment`);
return true;
}
if (user.role === "ADMIN") {
logger.warn(`Skipping code verification for instance admin`);
return true;
}
await checkRateLimitAndThrowError({
rateLimitingType: "core",
identifier: email,