oops update platform here too

This commit is contained in:
Devin Zuczek
2026-07-21 12:15:07 -04:00
parent dd3bcf6868
commit d56fe3a276
+3 -2
View File
@@ -106,7 +106,7 @@ const BASE_ROLES = ['gameClient']
export async function generateToken( export async function generateToken(
accountId: string, accountId: string,
platformId: string, platformId: string,
platform: string, platform: number,
secret: string, secret: string,
extraRoles: string[] = [] extraRoles: string[] = []
): Promise<string> { ): Promise<string> {
@@ -128,7 +128,8 @@ export async function generateToken(
platform, platform,
platform_id: platformId, platform_id: platformId,
'rn.ver': '20230302', 'rn.ver': '20230302',
'rn.plat': '0', // Same PlatformType int as the `platform` claim — it was pinned to Steam.
'rn.plat': platform,
role: [...BASE_ROLES, ...extraRoles], role: [...BASE_ROLES, ...extraRoles],
scope: TOKEN_SCOPES, scope: TOKEN_SCOPES,
jti: crypto.randomUUID(), jti: crypto.randomUUID(),