You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(platform): signing in on a browser that holds another person's session is refused as ORG_FORBIDDEN and worded as a wrong password #4919
Since #4903 (main07419b9c), POST /api/auth/sign-in/email answers 403 {"code":"ORG_FORBIDDEN","message":"This session is limited to the organization that signed you in."} when the request already carries a valid session of another person. The sign-in page words every refusal that is neither 429 nor 5xx as "wrong email or password" with the lockout hint (app/routes/_auth/log-in.tsx, login.wrongCredentials), so the person is told their password is wrong.
By the code path (not reproduced in a browser): backend/auth/auth.tssessionAuthorityBefore sets the mint authority from the presented session, and databaseHooks.session.create.before throws refuseScopedSession() when mint.userId !== session.userId. So person B cannot sign in on a browser where person A's session is still valid until A signs out, and B is not told why.
Found because Playwright (platform 4/4) has failed on every attempt since #4903 (E2E run 38358003084; rbac.spec.ts:16 and return-loops.spec.ts:111): the specs' second browser context unintentionally held the worker owner's cookie. The specs are fixed in #4916 by signing the member in from an empty cookie jar; the product behavior is unchanged there. The review lane reached the same reading from the logs (TALE-358, comment on #4903).
To decide
Signing in as a different person replaces the presented session: ignore the mint authority for /sign-in/email when the user differs, and keep the refusal for /reauthenticate and the two-factor verifications, where the session being minted must belong to the presented one. The password is the proof, so the presented session adds nothing.
Keep the refusal, but word it for what it is ("sign out of the other account first") and keep it off the wrong-password path.
Keep the behavior and document it.
Option 1 matches what a shared browser did before #4903. Whichever is chosen needs a regression test beside backend/auth/auth.session-authority.test.ts for a sign-in as a different person with a presented session, and, if the refusal stays, one for the sign-in page's wording.
Activity
docs: cover everything since v0.5.87 in the v0.5.88 notes
fix(platform): sign a person in over another person's session