docs(dev): pin AUTH_URL to the tenant subdomain #10

Merged
sharang merged 1 commits from fix/auth-url-dev into main 2026-05-19 16:05:45 +00:00

1 Commits

Author SHA1 Message Date
sharang f98d20ef0d docs(dev): pin AUTH_URL to the tenant subdomain
ci / e2e (pull_request) Has been skipped
ci / image (pull_request) Has been skipped
ci / shared (pull_request) Successful in 6s
ci / test (pull_request) Successful in 28s
Live-stack debugging caught this: Auth.js v5 builds the OAuth
redirect_uri from AUTH_URL, NOT from the request Host header, even
with AUTH_TRUST_HOST=true. If you visit http://acme.localhost:3000
with AUTH_URL=http://localhost:3000, Keycloak rejects the token
exchange because the PKCE cookie was set on acme.localhost but the
callback URL Auth.js sent was localhost.

Fix in dev: pin AUTH_URL to the subdomain you're testing on. In prod,
orca-proxy passes the right host via X-Forwarded-Host and AUTH_URL
is set to the apex.

Updates .env.example with a long-form note + sets AUTH_URL to the
acme tenant so a copy/paste-and-go workflow Just Works. Adds a
'AUTH_URL gotcha' callout to the local-dev section in README.

Refs: M5.1
2026-05-19 18:04:27 +02:00