mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
move legacy check below auth check in lock guard (#6696)
This commit is contained in:
@@ -33,6 +33,11 @@ export function lockGuard(): CanActivateFn {
|
|||||||
const router = inject(Router);
|
const router = inject(Router);
|
||||||
const userVerificationService = inject(UserVerificationService);
|
const userVerificationService = inject(UserVerificationService);
|
||||||
|
|
||||||
|
const authStatus = await authService.getAuthStatus();
|
||||||
|
if (authStatus !== AuthenticationStatus.Locked) {
|
||||||
|
return router.createUrlTree(["/"]);
|
||||||
|
}
|
||||||
|
|
||||||
// If legacy user on web, redirect to migration page
|
// If legacy user on web, redirect to migration page
|
||||||
if (await cryptoService.isLegacyUser()) {
|
if (await cryptoService.isLegacyUser()) {
|
||||||
if (platformUtilService.getClientType() === ClientType.Web) {
|
if (platformUtilService.getClientType() === ClientType.Web) {
|
||||||
@@ -43,11 +48,6 @@ export function lockGuard(): CanActivateFn {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const authStatus = await authService.getAuthStatus();
|
|
||||||
if (authStatus !== AuthenticationStatus.Locked) {
|
|
||||||
return router.createUrlTree(["/"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// User is authN and in locked state.
|
// User is authN and in locked state.
|
||||||
|
|
||||||
const tdeEnabled = await deviceTrustCryptoService.supportsDeviceTrust();
|
const tdeEnabled = await deviceTrustCryptoService.supportsDeviceTrust();
|
||||||
|
|||||||
Reference in New Issue
Block a user