fix: login failure on u23 and below (#1972)

Reviewed-on: OpenWF/SpaceNinjaServer#1972
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2025-05-03 17:48:01 -07:00 committed by Sainan
parent cad82cf7de
commit 355a70d366
2 changed files with 7 additions and 4 deletions

View File

@ -103,13 +103,16 @@ const createLoginResponse = (myAddress: string, account: IDatabaseAccountJson, b
CountryCode: account.CountryCode, CountryCode: account.CountryCode,
AmazonAuthToken: account.AmazonAuthToken, AmazonAuthToken: account.AmazonAuthToken,
AmazonRefreshToken: account.AmazonRefreshToken, AmazonRefreshToken: account.AmazonRefreshToken,
ConsentNeeded: account.ConsentNeeded,
TrackedSettings: account.TrackedSettings,
Nonce: account.Nonce, Nonce: account.Nonce,
IRC: config.myIrcAddresses ?? [myAddress], IRC: config.myIrcAddresses ?? [myAddress],
NRS: config.NRS, NRS: config.NRS,
BuildLabel: buildLabel BuildLabel: buildLabel
}; };
if (version_compare(buildLabel, "2018.11.08.14.45") >= 0) {
// U24 and up
resp.ConsentNeeded = account.ConsentNeeded;
resp.TrackedSettings = account.TrackedSettings;
}
if (version_compare(buildLabel, "2019.08.29.20.01") >= 0) { if (version_compare(buildLabel, "2019.08.29.20.01") >= 0) {
// U25.7 and up // U25.7 and up
resp.ForceLogoutVersion = account.ForceLogoutVersion; resp.ForceLogoutVersion = account.ForceLogoutVersion;

View File

@ -8,8 +8,8 @@ export interface IAccountAndLoginResponseCommons {
ForceLogoutVersion?: number; ForceLogoutVersion?: number;
AmazonAuthToken?: string; AmazonAuthToken?: string;
AmazonRefreshToken?: string; AmazonRefreshToken?: string;
ConsentNeeded: boolean; ConsentNeeded?: boolean;
TrackedSettings: string[]; TrackedSettings?: string[];
Nonce: number; Nonce: number;
} }