mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-03 23:21:29 +01:00
[bug] Account for entityId as a userId alternative during state migration (#622)
Some clients, like Directory Connector, use different key for their user identifier: entityId We currently only check for userId in the migration service, but need to account for both.
This commit is contained in:
parent
7300db703c
commit
cf1e483c7f
@ -193,7 +193,8 @@ export class StateMigrationService {
|
|||||||
alwaysShowDock: await this.get<boolean>(v1Keys.alwaysShowDock),
|
alwaysShowDock: await this.get<boolean>(v1Keys.alwaysShowDock),
|
||||||
};
|
};
|
||||||
|
|
||||||
const userId = await this.get<string>(v1Keys.userId);
|
const userId =
|
||||||
|
(await this.get<string>(v1Keys.userId)) ?? (await this.get<string>(v1Keys.entityId));
|
||||||
|
|
||||||
// (userId == null) = no logged in user (so no known userId) and we need to temporarily store account specific settings in state to migrate on first auth
|
// (userId == null) = no logged in user (so no known userId) and we need to temporarily store account specific settings in state to migrate on first auth
|
||||||
// (userId != null) = we have a currently authed user (so known userId) with encrypted data and other key settings we can move, no need to temporarily store account settings
|
// (userId != null) = we have a currently authed user (so known userId) with encrypted data and other key settings we can move, no need to temporarily store account settings
|
||||||
|
Loading…
Reference in New Issue
Block a user