-
Notifications
You must be signed in to change notification settings - Fork 832
Description
问题描述 | Bug Description
对于使用授权代码登录的微软账户,刷新时必须携带client_secret,然而
HMCL/HMCL/src/main/java/org/jackhuang/hmcl/game/OAuthServer.java
Lines 179 to 181 in 9202cd6
| public boolean isPublicClient() { | |
| return true; // We have turned on the device auth flow. | |
| } |
导致刷新账号时不会携带client_secret,刷新失败
启动器崩溃报告 / 启动器日志文件 | Launcher Crash Report / Launcher Log File
[02:14:08] [@.task.AsyncTaskExecutor.lambda$executeNormalTask$31/TRACE] Task failed: org.jackhuang.hmcl.ui.account.AccountListItem.refreshAsync(AccountListItem.java:99)
org.jackhuang.hmcl.auth.yggdrasil.RemoteAuthenticationException: invalid_client: AADSTS70002: The provided request must include a 'client_secret' input parameter. Trace ID: bcc86f62-478d-4571-8dcf-639a301c6300 Correlation ID: c29cecbd-fdbb-452e-803d-4750bcce5d18 Timestamp: 2026-02-18 18:14:12Z:
at org.jackhuang.hmcl.auth.OAuth.handleErrorResponse(OAuth.java:192)
at org.jackhuang.hmcl.auth.OAuth.refresh(OAuth.java:169)
at org.jackhuang.hmcl.auth.microsoft.MicrosoftService.refresh(MicrosoftService.java:85)
at org.jackhuang.hmcl.auth.microsoft.MicrosoftAccount.logIn(MicrosoftAccount.java:91)
at org.jackhuang.hmcl.ui.account.AccountListItem.lambda$refreshAsync$0(AccountListItem.java:102)
at org.jackhuang.hmcl.util.function.ExceptionalRunnable.lambda$toCallable$0(ExceptionalRunnable.java:32)
at org.jackhuang.hmcl.task.Task$SimpleTask.execute(Task.java:1110)
at org.jackhuang.hmcl.task.AsyncTaskExecutor.lambda$executeNormalTask$22(AsyncTaskExecutor.java:241)
at org.jackhuang.hmcl.util.Lang.lambda$wrap$2(Lang.java:325)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1825)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1817)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)