Return unauthorized if header auth is the only one

This commit is contained in:
Owen
2025-10-13 15:20:04 -07:00
parent 6664efaa13
commit 48af91c976
2 changed files with 6 additions and 1 deletions

View File

@@ -314,6 +314,11 @@ export async function verifyResourceSession(
logger.debug("Resource allowed because header auth is valid");
return allowed(res);
}
// if there are no other auth methods we need to return unauthorized here
if (!sso && !pincode && !password && !resource.emailWhitelistEnabled) {
return notAllowed(res);
}
}
if (!sessions) {