-
Notifications
You must be signed in to change notification settings - Fork 19
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
Adding support for google oauth2 authentication in the omni-executor #3244
Adding support for google oauth2 authentication in the omni-executor #3244
Conversation
Implements Display trait for AuthenticationError to provide better error messages for logging and user feedback. This also fixes the dead code warning for AuthTokenError variant.
Adds implementation of Google OAuth2 token verification for authentication. This includes: - State verifier validation - Token exchange using authorization code - ID token decoding and validation - Identity verification against sender's identity
Changes auth token claims to use sender identity hash instead of omni account. This simplifies the auth token verification process by removing the dependency on omni account storage and making the verification more direct.
@@ -0,0 +1,102 @@ | |||
mod oauth2_client; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be moved out of identity-verificaiton / heima context ? To me it looks like just general oauth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, in the identity worker we have this in litentry/core/data-providers
but since we are not sure if we are going to support the identity/vc related stuff in the omni-executor I didn't create that structure. I'll create an oauth-providers
crate as we might add support for others
Implements a new RPC endpoint `omni_getOAuth2GoogleAuthorizationUrl` that generates and returns an authorization URL for Google OAuth2 authentication flow. The endpoint: - Takes Google account and redirect URI as parameters - Stores state verifier in database for security - Returns hex-encoded authorization URL - Integrates with existing identity verification system
Moves Google OAuth2 client implementation from identity-verification crate to the new oauth-providers crate for better code organization.
This PR introduces support for google oauth2 authentication for native calls as well as some refactoring: Renamed the
primitives
crate toexecutor-primitives
and updated all relevant references in the codebase.