(20241129) HTML views adjusted.
This commit is contained in:
@@ -150,6 +150,12 @@ async def mail_callback(
|
||||
|
||||
if mail_client == "gmail":
|
||||
|
||||
# In case the user cancelled halfway through (on Google's screen):
|
||||
if inbound_data.get("error") == "access_denied": return await render_template(
|
||||
"/mail/oauth/oauth_cancelled_v2.html",
|
||||
mail_client = mail_client.title()
|
||||
)
|
||||
|
||||
# Generate the tokens from the callback:
|
||||
tokens = await current_app.gmail_client.get_authorization_tokens(
|
||||
redirect_url = request.url,
|
||||
@@ -188,7 +194,7 @@ async def mail_callback(
|
||||
|
||||
# Return an HTML response:
|
||||
return await render_template(
|
||||
"/mail/oauth/oauth_success.html" if tokens_saved else "/mail/oauth/oauth_failure.html",
|
||||
"/mail/oauth/oauth_success_v2.html" if tokens_saved else "/mail/oauth/oauth_failure_v2.html",
|
||||
mail_client = mail_client.title()
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user