Skip to content

Commit e427364

Browse files
author
lijiahao
committed
v1.9.5
1 parent 3c38d40 commit e427364

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

app/background.js

Lines changed: 8 additions & 4 deletions
Large diffs are not rendered by default.

main/MsalAuthentication.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@ export default class Authentication {
173173
"[getMsalDeviceCode()] Starting get device code",
174174
);
175175

176-
const forceRegionIp = this._application._store.get("force_region_ip", "");
176+
const settings: any = this._application._store.get(
177+
"settings",
178+
defaultSettings
179+
);
180+
181+
const forceRegionIp = settings.force_region_ip;
177182
if (
178183
forceRegionIp &&
179184
typeof forceRegionIp === "string" &&
@@ -227,7 +232,12 @@ export default class Authentication {
227232
"[startAuthflow()] Starting authentication flow",
228233
);
229234

230-
const forceRegionIp = this._application._store.get("force_region_ip", "");
235+
const settings: any = this._application._store.get(
236+
"settings",
237+
defaultSettings
238+
);
239+
240+
const forceRegionIp = settings.force_region_ip;
231241
if (
232242
forceRegionIp &&
233243
typeof forceRegionIp === "string" &&

main/ipc/app.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ export default class IpcApp extends IpcBase {
112112
this._application._msalAuthentication._tokenStore.clear();
113113
this._application._store.delete("user");
114114
this._application._store.delete("auth");
115+
clearStreamToken();
116+
clearWebToken();
115117

116118
this._application.log(
117119
"authentication",

main/xal/xal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ export default class Xal {
491491

492492
return { userToken, deviceToken, sisuToken }
493493
} catch (error) {
494-
throw new TokenRefreshError('Failed to refresh tokens: ' + JSON.stringify(error))
494+
throw new TokenRefreshError('Failed to refresh tokens: ' + JSON.stringify(error.message))
495495
}
496496
}
497497

0 commit comments

Comments
 (0)