homebridge-xbox-tv 3.3.2 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/localApi/xboxlocalapi.js +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
10
10
|
- After update to 2.x.x the plugin settings (xboxLiveId) need to be updated
|
|
11
11
|
- After update to v3.0.0 RESTFull and MQTT config settings need to be updated
|
|
12
12
|
|
|
13
|
+
## [3.3.3] - (04.02.2025)
|
|
14
|
+
|
|
15
|
+
## Changes
|
|
16
|
+
|
|
17
|
+
- fix [#221](https://github.com/grzegorz914/homebridge-xbox-tv/issues/221)
|
|
18
|
+
|
|
13
19
|
## [3.3.2] - (04.02.2025)
|
|
14
20
|
|
|
15
21
|
## Changes
|
package/package.json
CHANGED
|
@@ -441,12 +441,12 @@ class XboxLocalApi extends EventEmitter {
|
|
|
441
441
|
connectRequest.set('publicKey', data.publicKey);
|
|
442
442
|
connectRequest.set('iv', data.iv);
|
|
443
443
|
|
|
444
|
-
const
|
|
445
|
-
const parseTokenData = JSON.parse(
|
|
446
|
-
const tokenData = parseTokenData
|
|
444
|
+
const response = await this.readData(this.tokensFile);
|
|
445
|
+
const parseTokenData = JSON.parse(response);
|
|
446
|
+
const tokenData = parseTokenData?.xsts?.Token?.trim() || null;
|
|
447
447
|
if (tokenData) {
|
|
448
|
-
connectRequest.set('userHash',
|
|
449
|
-
connectRequest.set('jwt',
|
|
448
|
+
connectRequest.set('userHash', parseTokenData.xsts.DisplayClaims?.xui?.[0]?.uhs || '', true);
|
|
449
|
+
connectRequest.set('jwt', parseTokenData.xsts.Token, true);
|
|
450
450
|
this.isAuthorized = true;
|
|
451
451
|
}
|
|
452
452
|
const debug = this.enableDebugMode ? this.emit('debug', `Client connecting using: ${this.isAuthorized ? 'XSTS token' : 'Anonymous'}.`) : false;
|