async def google_authorize() -> WrappedGenericMessageResponse:
            """Redirect user to Google's OAuth 2.0 consent screen."""
            state = "some_random_string_or_csrf_token"  # Usually you store a random state in session/Redis
            scope = "openid email profile"

            # Build the Google OAuth URL
            params = {
                "client_id": self.google_client_id,
                "redirect_uri": self.google_redirect_uri,
                "response_type": "code",
                "scope": scope,
                "state": state,
                "access_type": "offline",  # to get refresh token if needed
                "prompt": "consent",  # Force consent each time if you want
            }
            google_auth_url = f"https://accounts.google.com/o/oauth2/v2/auth?{urllib.parse.urlencode(params)}"
            return GenericMessageResponse(message=google_auth_url)  # type: ignore
Redirect user to Google's OAuth 2.0 consent screen.
py/core/main/api/v3/users_router.py