From 838783e3849c5f91dddbda10e5dea9e95a04870b Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Tue, 14 Apr 2026 15:17:34 +0800 Subject: [PATCH] fix(auth): clear cached silentLoginPromise on logout to allow re-authentication After logout, the cached silentLoginPromise caused silentLogin() to return a stale result instead of re-executing loginByComputerName(), leaving sessionManager.currentUser as null and making subsequent switchUser() calls fail. Co-Authored-By: Claude Opus 4.6 --- src/main/services/auth/auth-application-service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/services/auth/auth-application-service.ts b/src/main/services/auth/auth-application-service.ts index 1986b3d..fd81992 100644 --- a/src/main/services/auth/auth-application-service.ts +++ b/src/main/services/auth/auth-application-service.ts @@ -215,6 +215,7 @@ export class AuthApplicationService { } this.sessionManager.logout() + this.silentLoginPromise = null await this.updateService.setUserContext(null) }, { operation: 'logout' }