Skip to content

app/: signing in lands in the app, not back on the site (sc-8900) - #114

Merged
ndbroadbent merged 1 commit into
mainfrom
app-session-cookie
Dec 3, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
app-session-cookie

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

After the cutover (sc-8900), Nathan clicked "Sign in with GitHub" on visualci.com, signed in, and landed back on visualci.com's homepage instead of the app.

Cause: route_by_host sends the app's / to the landing page when there's no session cookie. It looked for HostUrls::session_cookie (SESSION_COOKIE, default visualci_session), but Laravel Rust's session cookie is named by the framework's own session config, and in production it's laravel_session. So after a successful sign-in, the callback's redirect to the app's / found no "session" and bounced to the site, every time.

Fix: the check uses laravel::config().session.cookie, the name the session middleware actually sets, so the two can't drift apart. HostUrls::session_cookie is gone.

Test: tests/sign_in.rs, signing_in_from_the_site_lands_in_the_app, with all four hosts configured as production has them. It runs a GitHub sign-in on the app host (faked), and the callback redirects to /. The app's / with that session answers 200 with no redirect, and /auth/session says signed in. Signed out, the app's / still goes to the landing page. The site's sign-in links already go to the app's /auth/github (appUrl), so nothing changes there.

The MCP allowed-hosts fix is in features' own PR (branch app-mcp-allowed-hosts).

Ran on a build-pool box with a throwaway Postgres 17: fmt, clippy -D warnings, sign_in (18), hosts (8) and oauth (3) all pass. This should be the first deploy after the cutover.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ute_by_host looks for the framework's own session cookie (laravel_session), not a separate SESSION_COOKIE default that never matched
@ndbroadbent
ndbroadbent merged commit a2f685b into main Dec 3, 2026
12 checks passed
@ndbroadbent
ndbroadbent deleted the app-session-cookie branch December 3, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant