mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[PM-3050] Add sync on unlock, logout when account is deleted (#9288)
* Add sync on unlock, logout when account is deleted * Update libs/common/src/vault/services/sync/sync.service.ts Co-authored-by: SmithThe4th <gsmith@bitwarden.com> * Fix failing unit tests * Fix incorrect merge --------- Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
This commit is contained in:
@@ -145,6 +145,11 @@ export class SyncService extends CoreSyncService {
|
||||
}
|
||||
|
||||
const response = await this.apiService.getAccountRevisionDate();
|
||||
if (response < 0 && this.logoutCallback) {
|
||||
// Account was deleted, log out now
|
||||
await this.logoutCallback(false);
|
||||
}
|
||||
|
||||
if (new Date(response) <= lastSync) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user