Repository navigation
Conversation
Self-hosters can enable GitHub/Google via env vars (or hide with DISABLE_*_AUTH). Document setup; login/onboarding follow server flags.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe auth package now determines whether GitHub and Google login are enabled from their credentials and disable flags. The auth router returns provider availability and rejects sign-in attempts for disabled providers. The self-hosting documentation describes the settings and their effect on Google Search Console. ChangesOAuth provider availability
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Client
participant AuthRouter
participant ProviderHelpers
participant Environment
Client->>AuthRouter: request provider availability
AuthRouter->>ProviderHelpers: get enabled provider status
ProviderHelpers->>Environment: read credentials and disable flags
Environment-->>ProviderHelpers: return environment values
ProviderHelpers-->>AuthRouter: return provider status
AuthRouter-->>Client: return enabled providers
Client->>AuthRouter: request OAuth sign-in
AuthRouter->>ProviderHelpers: check selected provider
alt Provider enabled
ProviderHelpers-->>AuthRouter: return enabled
AuthRouter-->>Client: return authorization URL
else Provider disabled
ProviderHelpers-->>AuthRouter: return disabled
AuthRouter-->>Client: return provider-specific bad request
end
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The OAuth configuration and sign-in checks present no identified merge-blocking risk. Search Console availability remains independent of login-disable flags. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Provider visibility and sign-in initiation now share one policy, but disabling a provider does not prevent its callbacks from creating sessions while valid login credentials remain configured. Existing identity and registration checks limit the impact; the flags should not be treated as a complete authentication shutdown. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 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 |
Keep the upstream auth.providers contract and login UI, including independent Search Console availability. Retain credential checks, login disable flags, and the server-side OAuth gate; remove the duplicate provider hook. Verify 15 OAuth tests, auth/trpc/dashboard typechecks, and focused lint.
|
Hey, thanks a lot for this contribution! We just merged a full rewrite of the OpenPanel codebase into main, so this PR no longer applies and we're closing it. If you still want this change in, please open a new PR against the new main. Sorry for the extra work, and thanks again! |
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
DISABLE_GITHUB_AUTHorDISABLE_GOOGLE_AUTH. Disabled providers also reject sign-in attempts.Documentation