Skip to content

Commit b6d22b4

Browse files
committed
fix token expired make xCloud error
1 parent 64d075d commit b6d22b4

File tree

5 files changed

+29
-12
lines changed

5 files changed

+29
-12
lines changed

app/background.js

Lines changed: 11 additions & 5 deletions
Large diffs are not rendered by default.

app/preload.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flatpak/io.github.Geocld.XStreamingDesktop.metainfo.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
</screenshot>
3535
</screenshots>
3636
<releases>
37+
<release version="1.8.9" date="2025-09-24">
38+
<description>
39+
<ul>
40+
<li>Fixed:</li>
41+
<li>Fix for xCloud Login Error Due to Expired Token.</li>
42+
</ul>
43+
</description>
44+
</release>
3745
<release version="1.8.8" date="2025-09-22">
3846
<description>
3947
<ul>

main/authentication.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,23 @@ export default class Authentication {
137137
);
138138
} else {
139139
// Skip refreshTokens within 23 hours
140+
console.log('Skip refreshTokens within 23 hours')
140141
if (
141142
Date.now() - this._tokenStore.getTokenUpdateTime() <
142143
23 * 60 * 60 * 1000
143144
) {
144145
console.log('[startSilentFlow] skip refreshTokens - branch1');
145146

146147
// Get new streaming token
147-
this._xal
148-
.getStreamingToken(this._tokenStore)
148+
this.getStreamingToken(this._tokenStore)
149149
.then(streamingTokens => {
150150
// console.log('streamingTokens:', JSON.stringify(streamingTokens));
151151
this._xal.getWebToken(this._tokenStore).then(webToken => {
152+
if (streamingTokens.xCloudToken !== null) {
153+
this._appLevel = 2;
154+
} else {
155+
this._appLevel = 1;
156+
}
152157
saveStreamToken(streamingTokens);
153158
saveWebToken(webToken);
154159
this._application.authenticationCompleted(streamingTokens, webToken);
@@ -161,8 +166,7 @@ export default class Authentication {
161166
console.log(
162167
'[startSilentFlow()] Tokens have been refreshed - branch1',
163168
);
164-
this._xal
165-
.getStreamingToken(this._tokenStore)
169+
this.getStreamingToken(this._tokenStore)
166170
.then(streamingTokens => {
167171
// log.info('streamingTokens:', streamingTokens);
168172
this._xal.getWebToken(this._tokenStore).then(webToken => {
@@ -405,7 +409,6 @@ export default class Authentication {
405409
}
406410

407411
async getStreamingToken(tokenStore: TokenStore) {
408-
console.log("getStreamingToken");
409412
const sisuToken = tokenStore.getSisuToken();
410413
if (sisuToken === undefined)
411414
throw new Error("Sisu token is missing. Please authenticate first");

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"name": "xstreaming",
44
"description": "xstreaming",
5-
"version": "1.8.8",
5+
"version": "1.8.9",
66
"author": "Geocld <lijiahao5372@gmail.com>",
77
"main": "app/background.js",
88
"scripts": {

0 commit comments

Comments
 (0)