async def oauth_login(request: fastapi.Request):
        """
        Handles the OAuth login process by redirecting to the Hugging Face OAuth page.

        Args:
            request (fastapi.Request): The incoming HTTP request.

        Returns:
            Response: A redirection response to the Hugging Face OAuth authorization page.
        """
        """Endpoint that redirects to HF OAuth page."""
        redirect_uri = request.url_for("auth")
        redirect_uri_as_str = str(redirect_uri)
        if redirect_uri.netloc.endswith(".hf.space"):
            redirect_uri_as_str = redirect_uri_as_str.replace("http://", "https://")
        return await oauth.huggingface.authorize_redirect(request, redirect_uri_as_str)  # type: ignore

        Handles the OAuth login process by redirecting to the Hugging Face OAuth page.

        Args:
            request (fastapi.Request): The incoming HTTP request.

        Returns:
            Response: A redirection response to the Hugging Face OAuth authorization page.
        
src/autotrain/app/oauth.py