From c224d30d1092b8000e1cf4c513748a2fdfc9fec7 Mon Sep 17 00:00:00 2001 From: khushal Date: Thu, 28 Nov 2024 18:20:19 +0530 Subject: [PATCH] (20241128) Scope-handling going on... --- api/blueprints/mail/oauth_request.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/blueprints/mail/oauth_request.py b/api/blueprints/mail/oauth_request.py index 0c77ef4..14b0769 100644 --- a/api/blueprints/mail/oauth_request.py +++ b/api/blueprints/mail/oauth_request.py @@ -60,6 +60,9 @@ from utils_v2.api.async_quart import ( handle_cancelled_request ) +# GMail-related utils: +from utils_v2.goog.gmail.gmail_client import SCOPES_GMAIL_MAIL_MANAGEMENT + # Common: from shared import constants @@ -198,6 +201,7 @@ async def request_oauth_authorization_url( # Get the authorization URL: auth_url = await current_app.gmail_client.get_authorization_url( + scopes = SCOPES_GMAIL_MAIL_MANAGEMENT, state = user_identifier, access_type = "offline", approval_prompt = "force",