-
Notifications
You must be signed in to change notification settings - Fork 18
Add Google OAuth2 login support with client-specific credentials #3754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add GoogleOAuth2Config struct and loading logic to support
per-client Google OAuth2 credentials via environment variables
(OE_GOOGLE_CLIENT_ID_{CLIENT}, OE_GOOGLE_CLIENT_SECRET_{CLIENT}).
Create factory pattern to retrieve client-specific Google OAuth2 credentials with caching, following the same pattern as MailerFactory.
Replace direct google_client_id/secret fields with google_oauth2_factory to enable per-client OAuth2 credentials.
- Use (client_id, uid) tuple encoding for storage keys - Extract client_id from OmniAuth::OAuth2 enum - Retrieve client-specific Google OAuth2 config from factory - Add uid field to OAuth2Data for proper key generation
- Remove sender parameter from verify_oauth2_authentication - Return verified Identity instead of unit type - Move identity comparison to verify_auth caller - Enables direct access to OAuth2-verified identity
- Accept OAuth2 provider, code, state, and redirect_uri - Verify OAuth2 authentication and extract user identity - Create JWT access token for authenticated user - Return user identity string and access token - Support extensible provider mapping (currently Google)
|
Claude finished @silva-fj's task —— View job Pull Request ReviewI've completed a thorough review of the Google OAuth2 implementation. Here's my comprehensive feedback: Code Quality Analysis✅ Strengths
|
Summary
This PR adds Google OAuth2 authentication support with per-client credential configuration:
OE_GOOGLE_CLIENT_ID_{CLIENT},OE_GOOGLE_CLIENT_SECRET_{CLIENT})omni_loginWithOAuth2accepts OAuth2 authorization code and returns user identity + JWT access tokenIdentityfrom provider, enabling identity extraction without re-verificationThis new flow will allow clients to create the omni account and add passkeys using the access token after signing in with the oauth2 provider