feat(auth): hide/show GitHub & Google login (#384) - #492
Conversation
Self-hosters can enable GitHub/Google via env vars (or hide with DISABLE_*_AUTH). Document setup; login/onboarding follow server flags.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change adds GitHub and Google OAuth configuration helpers, exposes provider availability through tRPC, blocks disabled sign-in attempts, conditionally renders login and onboarding controls, adds tests, and documents self-hosted OAuth setup. ChangesOAuth provider availability
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to GitHub and Google login buttons now reflect configured credentials and disable flags, while disabled providers are rejected server-side and email authentication remains available. No concrete merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant LoginPage
participant AuthRouter
participant AuthConfig
participant Environment
LoginPage->>AuthRouter: request OAuth provider availability
AuthRouter->>AuthConfig: evaluate enabled providers
AuthConfig->>Environment: read credentials and disable flags
Environment-->>AuthConfig: return configuration
AuthConfig-->>AuthRouter: return provider states
AuthRouter-->>LoginPage: return enabled providers
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 7 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
CLIENT_ID+SECRET+REDIRECT_URI)DISABLE_GITHUB_AUTH/DISABLE_GOOGLE_AUTHto hide login while keeping Google creds for Search Consoleauth.getOAuthProviders+ server-side gate onsignInOAuthFixes #384
Test plan
DISABLE_GOOGLE_AUTH=truewith Google creds → Google button hiddensignInOAuthfor a disabled provider returns a bad-request erroroauth-providersunit tests passMade with Cursor
Summary by CodeRabbit
New Features
Documentation
Tests