Repository navigation
app/: signing in lands in the app, not back on the site (sc-8900) - #114
Merged
Merged
Conversation
…ute_by_host looks for the framework's own session cookie (laravel_session), not a separate SESSION_COOKIE default that never matched
ndbroadbent
force-pushed
the
app-session-cookie
branch
from
December 3, 2026 06:17
2144a99 to
05d479c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_hostsends the app's/to the landing page when there's no session cookie. It looked forHostUrls::session_cookie(SESSION_COOKIE, defaultvisualci_session), but Laravel Rust's session cookie is named by the framework's own session config, and in production it'slaravel_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_cookieis 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/sessionsays 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) andoauth(3) all pass. This should be the first deploy after the cutover.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.