From 0fbe995c12f013ab8bfa94438046de8eed40d306 Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Thu, 18 Apr 2024 17:08:44 +0100 Subject: [PATCH] Delete the login entry from SQL --- main | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main b/main index f26ca2d..1f558ae 100644 --- a/main +++ b/main @@ -83,6 +83,7 @@ def check_username_taken(username): async def oauth2_token_refresh(openid, appId): refreshes = 0 + nextopenid = "nil" while refreshes != 720: await asyncio.sleep(3600) refreshes = refreshes + 1 @@ -115,7 +116,13 @@ async def oauth2_token_refresh(openid, appId): conn.close() else: conn.close() - return + break + + conn = get_db_connection() + conn.execute("DELETE FROM logins WHERE appId = ? AND openid = ?", (appId, nextopenid)) + conn.commit() + conn.close() + # Finally, rest. # Disable CORS @app.after_request