PRG-02: Auth & URL bundle (from #328 #336 #337 #335 #329)#366
PRG-02: Auth & URL bundle (from #328 #336 #337 #335 #329)#366nap-liu wants to merge 5 commits intodataelement:mainfrom
Conversation
… check Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nant subdomain support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a generic OAuth2AuthProvider that works with any OAuth2-compliant identity provider (Google, Azure AD, Keycloak, Auth0, custom corporate OAuth2 servers, etc.). Backend: - New OAuth2AuthProvider class with configurable authorize_url, token_url, userinfo_url, client_id, client_secret, scope, and field_mapping - Token exchange uses application/x-www-form-urlencoded (RFC 6749) - Graceful handling of userinfo 401/empty/invalid responses - Configurable field_mapping maps provider fields to Clawith fields (provider_user_id, email, display_name, mobile, avatar_url) - Standard OIDC field fallbacks when no custom mapping is configured - Provider registered in auth_registry as "oauth2" - SSO callback route (GET /auth/oauth2/callback) with session handling - OAuth2 provider type added to SSO config endpoint Frontend: - OAuth2 configuration form with Token URL, UserInfo URL, Scope fields - Field Mapping section for custom provider field names - Save/update via dedicated OAuth2 API endpoints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Thanks for regrouping these changes. The areas covered here are important, but this PR is too broad to review or merge safely as-is, especially because it touches authentication, tenant/domain routing, SSO callbacks, migrations, and token caching at the same time. GitHub also currently reports this PR as not mergeable. Please split this into smaller focused PRs before we continue review. Suggested split:
A few concrete blockers I noticed:
Could you rebase this branch, split it into focused PRs, and start with the lowest-risk piece first? That will make it much easier for us to review and merge safely. |
|
Thanks for the review. The changes in this bundle already exist as focused, independent PRs. I've verified all five now merge cleanly against the current
Could we shift review back to the individual PRs? I'll drive each one separately per your suggested split. Happy to keep this bundle open for reference or close it if you'd rather consolidate review threads. |
This regrouped PR combines the original changes from:\n- #328 fix-unbound-user-login\n- #336 unified-url-resolution\n- #337 generic-oauth2-sso\n- #335 agent-prompt-base-url\n- #329 redis-token-cache\n\nScope: authentication flow, URL normalization, and auth cache behavior.