add version check for 20230414 client

This commit is contained in:
Devin Zuczek
2026-07-23 12:23:30 -04:00
parent 7ab171b646
commit 2f6a40279d
10 changed files with 42 additions and 23 deletions
+1
View File
@@ -10,6 +10,7 @@
"check:types": "run-tsc"
},
"dependencies": {
"@repo/domain": "workspace:*",
"hono": "4.12.27"
},
"devDependencies": {
+3 -2
View File
@@ -10,6 +10,8 @@
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
@@ -127,8 +129,7 @@ export async function generateToken(
idp: 'local',
platform,
platform_id: platformId,
'rn.ver': '20230302',
// Same PlatformType int as the `platform` claim — it was pinned to Steam.
'rn.ver': GAME_VERSION,
'rn.plat': platform,
role: [...BASE_ROLES, ...extraRoles],
scope: TOKEN_SCOPES,