Google Oauth Callback
Authentication
Google Oauth Callback
Handle Google OAuth 2.0 callback.
This endpoint:
- Exchanges the authorization code for user information from Google
- Creates or updates the user in the database
- Verifies the user has access to the specified tenant
- Issues a JWT token with user_id, tenant_id, role, and expiration
Args: request: Google OAuth callback request with code and tenant_id db: Async database session
Returns: TokenResponse: JWT token and user information
Raises: HTTPException 400: If Google OAuth validation fails HTTPException 403: If user doesn’t have access to the tenant
POST
Google Oauth Callback
Body
application/json
Response
Successful Response