Fix SSO provider 404 in production when credentials not configured#56
Fix SSO provider 404 in production when credentials not configured#56BENZOOgataga merged 4 commits intomainfrom
Conversation
Co-authored-by: BENZOOgataga <50145143+BENZOOgataga@users.noreply.github.com>
Co-authored-by: BENZOOgataga <50145143+BENZOOgataga@users.noreply.github.com>
Greptile SummaryThis PR fixes a production bug where SSO login buttons were visible even when the backend lacked OAuth credentials, causing "provider not found" 404 errors. The fix correctly flips the default from Key changes and issues found:
Confidence Score: 3/5
Last reviewed commit: 2822702 |
There was a problem hiding this comment.
Pull request overview
This PR addresses production “provider not found” 404s by ensuring SSO login options are hidden unless explicitly enabled, and by wiring OAuth credential environment variables into the preview Docker Compose setup.
Changes:
- Default SSO provider visibility flags to disabled (
false) unlessNEXT_PUBLIC_AUTH_*_ENABLED=trueis set. - Pass
NEXT_PUBLIC_AUTH_*_ENABLEDinto the Next.js build via Docker build args / Dockerfile env. - Add OAuth credential env vars to the backend service in
docker-compose.preview.yml, plus add an ops release note and update.env.example.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
docker/app.Dockerfile |
Adds NEXT_PUBLIC_AUTH_*_ENABLED build args and env exports for Next.js build-time injection. |
docker-compose.preview.yml |
Passes SSO build args to the image build and provides OAuth credential env vars to the backend service. |
apps/web/src/lib/auth-flags.ts |
Switches provider visibility defaults from enabled to disabled unless explicitly set. |
.releases/unreleased/fix-sso-production-env-vars.md |
Adds a patch release note describing the operational change. |
.env.example |
Updates example env documentation/values for SSO visibility flags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The core change in this PR sets the fallback in The example file values should be |
… runtime in release notes Co-authored-by: BENZOOgataga <50145143+BENZOOgataga@users.noreply.github.com>
Fixed in 9ab723b - changed all SSO flags in |
|
@copilot apply changes based on the comments in this thread |
All changes from the review thread have already been applied in commit 9ab723b:
|
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.