mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
PM-5263 - Clear all tokens on logout (#8536)
This commit is contained in:
@@ -1729,7 +1729,9 @@ export class StateService<
|
||||
}
|
||||
|
||||
protected async deAuthenticateAccount(userId: string): Promise<void> {
|
||||
await this.tokenService.clearAccessToken(userId as UserId);
|
||||
// We must have a manual call to clear tokens as we can't leverage state provider to clean
|
||||
// up our data as we have secure storage in the mix.
|
||||
await this.tokenService.clearTokens(userId as UserId);
|
||||
await this.setLastActive(null, { userId: userId });
|
||||
await this.updateState(async (state) => {
|
||||
state.authenticatedAccounts = state.authenticatedAccounts.filter((id) => id !== userId);
|
||||
|
||||
Reference in New Issue
Block a user