homebridge-xbox-tv 3.3.2 → 3.3.3-beta.0
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/package.json
CHANGED
|
@@ -441,11 +441,11 @@ 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 ? parseTokenData : null;
|
|
447
447
|
if (tokenData) {
|
|
448
|
-
connectRequest.set('userHash', tokenData.xsts.DisplayClaims
|
|
448
|
+
connectRequest.set('userHash', tokenData.xsts.DisplayClaims?.xui?.[0]?.uhs || '', true);
|
|
449
449
|
connectRequest.set('jwt', tokenData.xsts.Token, true);
|
|
450
450
|
this.isAuthorized = true;
|
|
451
451
|
}
|