1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

fix(auth-guard): [PM-22822] fix infinite redirect loop (#15371)

This commit is contained in:
rr-bw
2025-06-27 11:19:13 -07:00
committed by GitHub
parent 64f8073fdf
commit 7500fe32bb

View File

@@ -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]);