(20241204) Trying to fix scopes.

This commit is contained in:
2024-12-04 16:12:58 +05:30
parent b256bf7b5c
commit c4353ef323
+5 -1
View File
@@ -60,6 +60,9 @@ from utils_v2.api.async_quart import (
handle_cancelled_request handle_cancelled_request
) )
# GMail-related utils:
from utils_v2.goog.gmail.gmail_client import SCOPES_GMAIL_MAIL_MANAGEMENT
# Common: # Common:
from shared import constants from shared import constants
@@ -137,7 +140,8 @@ async def handle_gmail_callback() -> render_template:
# achieved by 'request.url' like this: # achieved by 'request.url' like this:
tokens = await current_app.gmail_client.get_authorization_tokens( tokens = await current_app.gmail_client.get_authorization_tokens(
redirect_url = request.url, redirect_url = request.url,
scopes = g.inbound_data["scope"] # scopes = g.inbound_data["scope"]
scopes = SCOPES_GMAIL_MAIL_MANAGEMENT
) )
if tokens: if tokens: