You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A server-side authorization plugin silently falls back to a plain-HTTP loopback redirect base when redirectUri isn't configured. Observed live on a Fabric-hosted deployment: the GitHub IdP hop was constructed as redirect_uri=http://localhost:9926/oauth/github/callback, so every connector authentication dead-ended at GitHub's "redirect_uri is not associated with this application" interstitial.
Why it's a security issue, not just a config footgun
GitHub happens to fail safe with a warning page. An IdP with a looser redirect policy (several treat loopback redirects permissively for native-app flows) would deliver the authorization code to whatever is listening on the end user's own localhost:9926. A silent default converts a missing config value into a code-interception hazard instead of a loud startup failure.
Fix
Remove the localhost fallback entirely: no redirectUri and no derivable public base → fail closed at config load with an error naming the missing key.
Problem
src/lib/config.ts:177:A server-side authorization plugin silently falls back to a plain-HTTP loopback redirect base when
redirectUriisn't configured. Observed live on a Fabric-hosted deployment: the GitHub IdP hop was constructed asredirect_uri=http://localhost:9926/oauth/github/callback, so every connector authentication dead-ended at GitHub's "redirect_uri is not associated with this application" interstitial.Why it's a security issue, not just a config footgun
GitHub happens to fail safe with a warning page. An IdP with a looser redirect policy (several treat loopback redirects permissively for native-app flows) would deliver the authorization code to whatever is listening on the end user's own localhost:9926. A silent default converts a missing config value into a code-interception hazard instead of a loud startup failure.
Fix
redirectUriand no derivable public base → fail closed at config load with an error naming the missing key.mcp.issueris configured, derive provider callbacks asissuer + '/oauth/<provider>/callback'— this matches the callback shape the enable tooling already instructs operators to register, and it keeps the value env-driven. (Consumer-side note: the obvious consumer fixredirectUri: ${PUBLIC_URL}/oauthis defeated by Harper's whole-token-only env interpolation — mcp.resource: ${FLAIR_MCP_ISSUER}/mcp never interpolates (whole-token-only env expansion) — every claude.ai connect fails invalid_target tpsdev-ai/flair#1180 — which is exactly why the derivation belongs plugin-side.)