Fix Keycloak login: enable assume_ssl for reverse proxy #154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Related to
ldraney/landscaping-assistant #151(login page fix deployed but Keycloak rejects the redirect).Repo
ldraney/landscaping-assistantWhat Broke
Clicking "Sign in with Keycloak" on the login page shows Keycloak's grey "We are sorry" error page. Keycloak logs:
error="invalid_redirect_uri",clientId="landscaping-assistant".Root cause:
config.assume_ssl = trueis commented out inconfig/environments/production.rb. Without it, Rails doesn't trustX-Forwarded-Protofrom the Tailscale funnel reverse proxy, so OmniAuth auto-derives the callback URL ashttp://...instead ofhttps://.... Keycloak only acceptshttps://landscaping-assistant.tail5b443a.ts.net/auth/keycloak/callback.Repro Steps
Expected Behavior
Clicking sign-in should show the Keycloak login form and authenticate the user.
Environment
d42018aAcceptance Criteria
Related
landscaping-assistantprojectldraney/landscaping-assistant #151— login page fix (prerequisite, already deployed)