1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

Account Recovery with Key Connector enabled not working prior to removal of Master Password (#15616)

This commit is contained in:
Maciej Zieniuk
2025-08-27 16:32:18 +02:00
committed by GitHub
parent fcc2bc96d1
commit 4c960906fa

View File

@@ -74,13 +74,6 @@ export const authGuard: CanActivateFn = async (
return router.createUrlTree(["lock"], { queryParams: { promptBiometric: true } }); return router.createUrlTree(["lock"], { queryParams: { promptBiometric: true } });
} }
if (
!routerState.url.includes("remove-password") &&
(await firstValueFrom(keyConnectorService.convertAccountRequired$))
) {
return router.createUrlTree(["/remove-password"]);
}
// Handle cases where a user needs to set a password when they don't already have one: // Handle cases where a user needs to set a password when they don't already have one:
// - TDE org user has been given "manage account recovery" permission // - TDE org user has been given "manage account recovery" permission
// - TDE offboarding on a trusted device, where we have access to their encryption key wrap with their new password // - TDE offboarding on a trusted device, where we have access to their encryption key wrap with their new password
@@ -106,5 +99,14 @@ export const authGuard: CanActivateFn = async (
return router.createUrlTree([route]); return router.createUrlTree([route]);
} }
// Remove password when Key Connector is enabled
if (
forceSetPasswordReason == ForceSetPasswordReason.None &&
!routerState.url.includes("remove-password") &&
(await firstValueFrom(keyConnectorService.convertAccountRequired$))
) {
return router.createUrlTree(["/remove-password"]);
}
return true; return true;
}; };