mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +00:00
fix(auth-guard): [PM-22822] fix infinite redirect loop (#15371)
This commit is contained in:
@@ -100,10 +100,10 @@ export const authGuard: CanActivateFn = async (
|
||||
|
||||
// Post- Account Recovery or Weak Password on login
|
||||
if (
|
||||
forceSetPasswordReason === ForceSetPasswordReason.AdminForcePasswordReset ||
|
||||
(forceSetPasswordReason === ForceSetPasswordReason.WeakMasterPassword &&
|
||||
!routerState.url.includes("update-temp-password") &&
|
||||
!routerState.url.includes("change-password"))
|
||||
(forceSetPasswordReason === ForceSetPasswordReason.AdminForcePasswordReset ||
|
||||
forceSetPasswordReason === ForceSetPasswordReason.WeakMasterPassword) &&
|
||||
!routerState.url.includes("update-temp-password") &&
|
||||
!routerState.url.includes("change-password")
|
||||
) {
|
||||
const route = isChangePasswordFlagOn ? "/change-password" : "/update-temp-password";
|
||||
return router.createUrlTree([route]);
|
||||
|
||||
Reference in New Issue
Block a user