[auth][api] accept the 20250424.01 client

Version check now answers "current" for a set of builds rather than one:
SUPPORTED_GAME_VERSIONS carries 20230414 and 20250424.01. GAME_VERSION is
unchanged and still what the server reports for itself (presence, rn.ver).

Adds GET /api/versioncheck/islandedversions, always [] — we never island a
build off into its own matchmaking pool.

The 2025 build POSTs /cachedlogin/forplatformid/:platform/:id with a
deviceId/platformAuth/time form body where the 2023 build GETs it, so that
route now takes both methods. The body is accepted and ignored for now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Devin Zuczek
2026-08-13 00:28:31 -04:00
committed by devin
parent 66c09806f9
commit 551585179a
6 changed files with 125 additions and 6 deletions
+12
View File
@@ -32,6 +32,18 @@ export const PRESENCE_TTL_SECONDS = 900
*/
export const GAME_VERSION = '20230414'
/**
* Client builds this server treats as current. `GAME_VERSION` is the one we report for
* ourselves; the rest are additional builds `/api/versioncheck/v4` answers "current"
* for, so a player on one of them isn't pushed into an update loop.
*/
export const SUPPORTED_GAME_VERSIONS: string[] = [GAME_VERSION, '20250424.01']
/** Whether a client-supplied build (the version check's `?v=`) is one we serve. */
export function isSupportedGameVersion(version: string | null | undefined): boolean {
return version != null && SUPPORTED_GAME_VERSIONS.includes(version)
}
/** Schema DDL (mirror of migrations/0006_presence.sql). */
export const PRESENCE_SCHEMA_DDL: string[] = [
`CREATE TABLE IF NOT EXISTS presence (