From 7bbbac6dc9161e9a29fa70e5009ffbacfbc8733a Mon Sep 17 00:00:00 2001 From: Devin Zuczek Date: Fri, 7 Aug 2026 14:46:15 -0400 Subject: [PATCH] increase token expiration workaround --- packages/jwt/src/jwt.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/jwt/src/jwt.ts b/packages/jwt/src/jwt.ts index 6e5e2af..93b5733 100644 --- a/packages/jwt/src/jwt.ts +++ b/packages/jwt/src/jwt.ts @@ -12,8 +12,11 @@ import { sign, verify } from 'hono/jwt' import { GAME_VERSION } from '@repo/domain' -/** Token lifetime in seconds (mirrored in the `expires_in` response field). */ -export const TOKEN_TTL_SECONDS = 3600 +// Token lifetime in seconds (mirrored in the `expires_in` response field). +// @todo Allegedly, the game is supposed to refresh tokens every 3600 seconds, but it doesn't. +// It's possible our refresh_token implementation is broken, but for now we just make the token +// last a day so the client doesn't have to refresh it. +export const TOKEN_TTL_SECONDS = 86400 /** * Validate an HS256 token and return its `sub` (account id) claim, or `null` when