diff --git a/surfsense_backend/app/connectors/google_gmail_connector.py b/surfsense_backend/app/connectors/google_gmail_connector.py index 0beabf1..0e75080 100644 --- a/surfsense_backend/app/connectors/google_gmail_connector.py +++ b/surfsense_backend/app/connectors/google_gmail_connector.py @@ -5,6 +5,7 @@ Allows fetching emails from Gmail mailbox using Google OAuth credentials. """ import base64 +import re from typing import Any from google.auth.transport.requests import Request @@ -261,7 +262,6 @@ class GoogleGmailConnector: "utf-8", errors="ignore" ) # Basic HTML tag removal (you might want to use a proper HTML parser) - import re text_content = re.sub(r"<[^>]+>", "", decoded_data) diff --git a/surfsense_backend/app/routes/google_gmail_add_connector_route.py b/surfsense_backend/app/routes/google_gmail_add_connector_route.py index 79b131b..01c6e7f 100644 --- a/surfsense_backend/app/routes/google_gmail_add_connector_route.py +++ b/surfsense_backend/app/routes/google_gmail_add_connector_route.py @@ -157,7 +157,3 @@ async def gmail_callback( raise except Exception as e: logger.error(f"Unexpected error in Gmail callback: {e!s}", exc_info=True) - # Redirect to frontend with error - return RedirectResponse( - url=f"{config.NEXT_FRONTEND_URL}/dashboard/{space_id}/connectors/add/google-gmail-connector?error=auth_failed" - )