From 764bd36f867a794b2531382699de02cca94b8949 Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Sat, 30 Mar 2024 19:41:00 +0000 Subject: [PATCH] Get user --- main | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main b/main index 95a1951..0cb3073 100644 --- a/main +++ b/main @@ -79,7 +79,9 @@ async def oauth2_token_refresh(openid, appId): conn = get_db_connection() # Fetch required data in a single query - login_data = conn.execute("SELECT nextcode, nextsecret, nextopenid FROM logins WHERE appId = ? AND openid = ?", (str(appId), str(openid))).fetchone() + login_data = conn.execute("SELECT nextcode, nextsecret, nextopenid, creator FROM logins WHERE appId = ? AND openid = ?", (str(appId), str(openid))).fetchone() + + user = get_user(int(login_data[3])) datatemplate = { "sub": user["username"],