fix: Pass through email verification if auth type is apiKey

This commit is contained in:
Dries Augustyns
2025-12-20 21:40:26 +01:00
parent 24f82b1be5
commit d7b5d3f60e
+4
View File
@@ -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();
}