diff --git a/src/app.ts b/src/app.ts index 3ef3212..003636e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -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,