Grant gate: keep the caller check on one line, as the caller-identity source test requires

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-29 20:47:46 +01:00
commit c8c26dc658

View file

@ -839,9 +839,8 @@ export async function startOAuthFlow(
const grantAllowed =
input.firstLoginGrant === "invite" &&
input.mode === "sign_in" &&
isAppCaller(caller) &&
caller.appSlug === profile.slug &&
profile.mayGrantFirstLogin === true;
profile.mayGrantFirstLogin === true &&
isAppCaller(caller) && caller.appSlug === profile.slug;
if (!grantAllowed) {
return {
statusCode: 400,