Skip to content

fix(auth): Sign in while already signed in goes straight to your settings - #728

Open
PiquelChips wants to merge 3 commits into
mainfrom
fix/stale-session-redirect
Open

PiquelChips wants to merge 3 commits into
mainfrom
fix/stale-session-redirect

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Opening sourceorigin.dev while signed in and selecting Sign in landed on auth's sign-in page again, saying "Signed in as @handle" next to the passkey and provider buttons, as if the session had expired. It hadn't: the homepage is static and can't know you're signed in, and /login asked a signed-in browser to sign in again with nowhere to go.

Now /login sends a browser that is already signed in straight on to where it was headed: the settings, or its return_to. The page still shows when it explains a failure (a refused form, a provider's error, a provider sign-in gone), when an app's authorization sent the browser there because its session falls short, or when the link asks for a class of authentication, as the admin dashboard's handoff does for a passkey. To switch accounts, sign out from the settings first.

Proof:

  • On this branch's preview, a Playwright script signed up with a virtual passkey, then clicked Sign in on the web homepage. Signed out it opened /login; signed in it landed on /settings. /login?return_to=/settings/sessions went on to the sessions page, and /login?acr=phr still showed "Signed in as @…".
  • layout.spec.ts (changed) and sign-in.spec.ts pass against the preview.
  • The full auth-service database suite passes (422 tests), including the updated signing_in_goes_on_to_the_path_asked_for and the dashboard handoff test.
  • Production logs showed the original report: GET / on web, then GET /login 200 on auth with a live session.

Council review

Rounds: 2

Delegate Round 1 Round 2
GPT 6.1 Sol no score (usage limit) no score (usage limit)
Claude Opus 5.5 8/10 9/10
Claude Fable 5.2 7/10 9/10

Round 1 found that a gone provider sign-in was skipped without its message, a browser test and a dashboard test that relied on the signed-in page, and stale docs; all fixed. Round 2 left only comment wording, also fixed.

Note

Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 and Claude Fable 5.2 (via T3 Code)

🤖 Generated with Claude Code

…ings

Opening /login in a browser that was already signed in showed the sign-in
form again with "Signed in as", as when following sourceorigin.dev's Sign in
link. It now goes on to the path the page continues to, unless it says why
something failed, an authorization sent it there, or the query asks for a
class of authentication, as the dashboard's handoff does.
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a5d488f3-a085-40dd-bd95-44f94fad9fbc
Commits

Reviewing files that changed from the base of the PR and between e99cc0e and f5ae151.

Files selected for processing: 6

  • apps/auth-service/src/web/admin/tests/sessions.rs
  • apps/auth-service/src/web/auth/login/mod.rs
  • apps/auth-service/src/web/auth/login/tests.rs
  • docs/dev/rust-conventions.md
  • docs/user/account/signing-in.md
  • tests/browser/layout.spec.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

… gone

Skip the page only when it has no alert, so a missing or expired provider
sign-in is still explained. Continuation::skipped names the path, and the
layout and dashboard handoff tests look at the page signed out or with acr.
@PiquelChips
PiquelChips added this pull request to the merge queue Nov 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 22, 2026
@PiquelChips
PiquelChips added this pull request to the merge queue Nov 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant