mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +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
|
// Post- Account Recovery or Weak Password on login
|
||||||
if (
|
if (
|
||||||
forceSetPasswordReason === ForceSetPasswordReason.AdminForcePasswordReset ||
|
(forceSetPasswordReason === ForceSetPasswordReason.AdminForcePasswordReset ||
|
||||||
(forceSetPasswordReason === ForceSetPasswordReason.WeakMasterPassword &&
|
forceSetPasswordReason === ForceSetPasswordReason.WeakMasterPassword) &&
|
||||||
!routerState.url.includes("update-temp-password") &&
|
!routerState.url.includes("update-temp-password") &&
|
||||||
!routerState.url.includes("change-password"))
|
!routerState.url.includes("change-password")
|
||||||
) {
|
) {
|
||||||
const route = isChangePasswordFlagOn ? "/change-password" : "/update-temp-password";
|
const route = isChangePasswordFlagOn ? "/change-password" : "/update-temp-password";
|
||||||
return router.createUrlTree([route]);
|
return router.createUrlTree([route]);
|
||||||
|
|||||||
Reference in New Issue
Block a user