async def google_callback(
            code: str = Query(...), state: str = Query(...)
        ) -> WrappedLoginResponse:
            """Google's callback that will receive the `code` and `state`.

            We then exchange code for tokens, verify, and log the user in.
            """
            # 1. Exchange `code` for tokens
            token_data = requests.post(
                "https://oauth2.googleapis.com/token",
                data={
                    "code": code,
                    "client_id": self.google_client_id,
                    "client_secret": self.google_client_secret,
                    "redirect_uri": self.google_redirect_uri,
                    "grant_type": "authorization_code",
                },
            ).json()
            if "error" in token_data:
                raise HTTPException(
                    status_code=400,
                    detail=f"Failed to get token: {token_data}",
                )

            # 2. Verify the ID token
            id_token_str = token_data["id_token"]
            try:
                # google_auth.transport.requests.Request() is a session for verifying
                id_info = id_token.verify_oauth2_token(
                    id_token_str,
                    google_requests.Request(),
                    self.google_client_id,
                )
            except ValueError as e:
                raise HTTPException(
                    status_code=400,
                    detail=f"Token verification failed: {str(e)}",
                ) from e

            # id_info will contain "sub", "email", etc.
            google_id = id_info["sub"]
            email = id_info.get("email")
            email = email or f"{google_id}@google_oauth.fake"

            # 3. Now call our R2RAuthProvider method that handles "oauth-based" user creation or login
            return await self.providers.auth.oauth_callback_handler(  # type: ignore
                provider="google",
                oauth_id=google_id,
                email=email,
            )
Google's callback that will receive the `code` and `state`.

            We then exchange code for tokens, verify, and log the user in.
            
py/core/main/api/v3/users_router.py