From d7b5d3f60ed1af6ca9bf8e2a659204a01ca3acb0 Mon Sep 17 00:00:00 2001 From: Dries Augustyns Date: Sat, 20 Dec 2025 21:40:26 +0100 Subject: [PATCH] fix: Pass through email verification if auth type is apiKey --- apps/api/src/middleware/auth.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/api/src/middleware/auth.ts b/apps/api/src/middleware/auth.ts index 6893a72..df2da38 100644 --- a/apps/api/src/middleware/auth.ts +++ b/apps/api/src/middleware/auth.ts @@ -416,6 +416,10 @@ export const requireEmailVerified = async (req: Request, res: Response, next: Ne try { const auth = res.locals.auth as AuthResponse; + if (auth.type === 'apiKey') { + return next(); + } + if (!auth.userId) { throw new NotAuthenticated(); }