This commit is contained in:
Tracker-Friendly 2024-03-30 19:41:00 +00:00
parent c70672a73d
commit 764bd36f86
1 changed files with 3 additions and 1 deletions

4
main
View File

@ -79,7 +79,9 @@ async def oauth2_token_refresh(openid, appId):
conn = get_db_connection() conn = get_db_connection()
# Fetch required data in a single query # 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 = { datatemplate = {
"sub": user["username"], "sub": user["username"],