From fbe6abc63ac375b43f76c364cba4590f9574bcd3 Mon Sep 17 00:00:00 2001 From: qhy040404 Date: Wed, 17 Jul 2024 14:10:30 +0800 Subject: [PATCH] try to fix qr login --- .../Snap.Hutao/Web/Hoyolab/Hk4e/Sdk/Combo/PandaClient.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Hk4e/Sdk/Combo/PandaClient.cs b/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Hk4e/Sdk/Combo/PandaClient.cs index 1396afbf..5f215ca9 100644 --- a/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Hk4e/Sdk/Combo/PandaClient.cs +++ b/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Hk4e/Sdk/Combo/PandaClient.cs @@ -19,7 +19,7 @@ internal sealed partial class PandaClient public async ValueTask> QRCodeFetchAsync(CancellationToken token = default) { - GameLoginRequest options = GameLoginRequest.Create(4, HoyolabOptions.DeviceId40); + GameLoginRequest options = GameLoginRequest.Create(8, HoyolabOptions.DeviceId40); HttpRequestMessageBuilder builder = httpRequestMessageBuilderFactory.Create() .SetRequestUri(ApiEndpoints.QrCodeFetch) @@ -34,10 +34,11 @@ internal sealed partial class PandaClient public async ValueTask> QRCodeQueryAsync(string ticket, CancellationToken token = default) { - GameLoginRequest options = GameLoginRequest.Create(4, HoyolabOptions.DeviceId40, ticket); + GameLoginRequest options = GameLoginRequest.Create(8, HoyolabOptions.DeviceId40, ticket); HttpRequestMessageBuilder builder = httpRequestMessageBuilderFactory.Create() .SetRequestUri(ApiEndpoints.QrCodeQuery) + .SetHeader("x-rpc-device_id", HoyolabOptions.DeviceId40) .PostJson(options); Response? resp = await builder