diff --git a/api/blueprints/mail/oauth_callback.py b/api/blueprints/mail/oauth_callback.py index 848510c..21d9627 100644 --- a/api/blueprints/mail/oauth_callback.py +++ b/api/blueprints/mail/oauth_callback.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 @@ -137,7 +140,8 @@ async def handle_gmail_callback() -> render_template: # achieved by 'request.url' like this: tokens = await current_app.gmail_client.get_authorization_tokens( redirect_url = request.url, - scopes = g.inbound_data["scope"] + # scopes = g.inbound_data["scope"] + scopes = SCOPES_GMAIL_MAIL_MANAGEMENT ) if tokens: