aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2025-08-08 23:25:09 +0100
committerGravatar Joe Banks <[email protected]>2025-08-08 23:25:09 +0100
commita0eeff1fdaf90939e7e5bf4e68a23071ac086680 (patch)
tree590298169c1a90a13ca7149a9fb0616a11ffb998 /backend
parentCalculate form ancillary data when fetching form data (diff)
Use exp key for JWT as well as expiry key
Diffstat (limited to 'backend')
-rw-r--r--backend/routes/auth/authorize.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/routes/auth/authorize.py b/backend/routes/auth/authorize.py
index 8fe7e85..7f18cb4 100644
--- a/backend/routes/auth/authorize.py
+++ b/backend/routes/auth/authorize.py
@@ -54,7 +54,10 @@ async def process_token(
"refresh": bearer_token["refresh_token"],
"user_details": user_details,
"in_guild": bool(member),
+ # Legacy key, we should use exp and use JWT expiry as below it.
"expiry": token_expiry.isoformat(),
+ # Correct JWT expiry key:
+ "exp": token_expiry
}
token = jwt.encode(data, SECRET_KEY, algorithm="HS256")