From 308b96af8bb277ca50efedd02151b6bd9a0c0bb5 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Fri, 8 Aug 2025 21:16:31 +0200 Subject: [PATCH] update the gmail connector add route --- surfsense_backend/app/app.py | 6 ------ .../app/routes/google_gmail_add_connector_route.py | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/surfsense_backend/app/app.py b/surfsense_backend/app/app.py index 1766c0c..17f9082 100644 --- a/surfsense_backend/app/app.py +++ b/surfsense_backend/app/app.py @@ -1,9 +1,3 @@ -import os - -os.environ["OAUTHLIB_RELAX_TOKEN_SCOPE"] = ( - "1" # It is to disbale the error "Invalid token scope" when using Google OAuth with increemental scopes -) - from contextlib import asynccontextmanager from fastapi import Depends, FastAPI 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 678f43d..79b131b 100644 --- a/surfsense_backend/app/routes/google_gmail_add_connector_route.py +++ b/surfsense_backend/app/routes/google_gmail_add_connector_route.py @@ -1,4 +1,7 @@ -# app/routes/google_gmail.py +import os + +os.environ["OAUTHLIB_RELAX_TOKEN_SCOPE"] = "1" + import base64 import json import logging