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 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-04-14 15:17:34 +08:00
parent d5028bfcf4
commit 838783e384

View File

@@ -215,6 +215,7 @@ export class AuthApplicationService {
}
this.sessionManager.logout()
this.silentLoginPromise = null
await this.updateService.setUserContext(null)
},
{ operation: 'logout' }