(20241205) Migrating from the field "accountId" to "tokenId" to identify auth tokens.

This commit is contained in:
2024-12-05 11:19:23 +05:30
parent f835143ef4
commit 5c36f90e98
15 changed files with 478 additions and 47 deletions
+2 -2
View File
@@ -159,7 +159,7 @@ async def handle_gmail_callback() -> render_template:
# if they don't match, we reject the authorization:
placeholder_token = await current_app.mail_oauth_model.get_token(
mongo_conn = current_app.data_mongo,
account_identifier = g.inbound_data["state"]
token_id = g.inbound_data["state"]
)
if (
(not placeholder_token) or
@@ -210,7 +210,7 @@ async def handle_gmail_callback() -> render_template:
db_conn = current_app.sql_writer,
mongo_conn = current_app.data_mongo,
session_token = g.inbound_headers.get("X-Session-Token"),
account_identifier = g.inbound_data["state"],
token_id = g.inbound_data["state"],
email_id = tokens.email,
token = tokens.model_dump()
)