(20241204) Trying to solve Gmail's scopes
This commit is contained in:
@@ -140,7 +140,7 @@ 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"].split(" ")
|
||||||
)
|
)
|
||||||
|
|
||||||
if tokens:
|
if tokens:
|
||||||
|
|||||||
@@ -92,12 +92,12 @@ import base64
|
|||||||
SCOPES_GMAIL_MAIL_MANAGEMENT = [
|
SCOPES_GMAIL_MAIL_MANAGEMENT = [
|
||||||
r"https://www.googleapis.com/auth/gmail.modify",
|
r"https://www.googleapis.com/auth/gmail.modify",
|
||||||
r"https://www.googleapis.com/auth/gmail.labels",
|
r"https://www.googleapis.com/auth/gmail.labels",
|
||||||
r"profile",
|
# r"profile",
|
||||||
r"https://www.googleapis.com/auth/userinfo.profile"
|
r"https://www.googleapis.com/auth/userinfo.profile"
|
||||||
]
|
]
|
||||||
SCOPES_GMAIL_FULL = [
|
SCOPES_GMAIL_FULL = [
|
||||||
r"https://mail.google.com/",
|
r"https://mail.google.com/",
|
||||||
r"profile",
|
# r"profile",
|
||||||
r"https://www.googleapis.com/auth/userinfo.profile"
|
r"https://www.googleapis.com/auth/userinfo.profile"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user