docs(dev): pin AUTH_URL to the tenant subdomain #10
Reference in New Issue
Block a user
Delete Branch "fix/auth-url-dev"
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?
What
Captures the AUTH_URL gotcha I hit during the live-stack smoke run.
.env.examplenow pinsAUTH_URL=http://acme.localhost:3000and includes a long-form comment explaining why.Why
Auth.js v5 builds the OAuth
redirect_urifromAUTH_URL— not from the request Host header, even withAUTH_TRUST_HOST=true. If you visithttp://acme.localhost:3000whileAUTH_URL=http://localhost:3000, Keycloak rejects the token exchange withinvalid_grant: Incorrect redirect_uribecause the PKCE cookie was set onacme.localhostbut the callback URL Auth.js sent points atlocalhost. Took an hour of poking at Host headers + AUTH_TRUST_HOST + cookie scoping to land on this.In prod, orca-proxy passes the actual host via X-Forwarded-Host and
AUTH_URLis set to the apex (https://breakpilot.com).Refs: M5.1 follow-up
Risk
Doc + env-template only.