1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-23 19:53:43 +00:00

Fix migration to Key Connector (#452)

* Move Key Connector check to subclass

* Move authService.logout call to main program

* Move Key Connector migration check to unlock command

* Use get/setConvertAccountRequired flag

* Move Key Connector convert to own command, set usesKeyConnector after conversion

* Remove KC conversion check from syncCommand, fix callback

* Make class service private

* Fix naming convention

* Update jslib and deps
This commit is contained in:
Thomas Rittson
2022-01-21 06:03:37 +10:00
committed by GitHub
parent 922cd1dc54
commit 8b650666c5
7 changed files with 159 additions and 29 deletions

View File

@@ -50,6 +50,8 @@ import { Program } from "./program";
import { SendProgram } from "./send.program";
import { VaultProgram } from "./vault.program";
import { Account, AccountFactory } from "jslib-common/models/domain/account";
// Polyfills
(global as any).DOMParser = new jsdom.JSDOM().window.DOMParser;
@@ -136,7 +138,8 @@ export class Main {
this.storageService,
this.secureStorageService,
this.logService,
this.stateMigrationService
this.stateMigrationService,
new AccountFactory(Account)
);
this.cryptoService = new CryptoService(
@@ -328,6 +331,9 @@ export class Main {
}
async logout() {
this.authService.logOut(() => {
/* Do nothing */
});
const userId = await this.stateService.getUserId();
await Promise.all([
this.syncService.setLastSync(new Date(0)),