Feature 11034: Forgot Password in OSM
[osm/NG-UI.git] / src / services / AuthGuardService.ts
index 3e0ef8f..05d3a1e 100644 (file)
@@ -49,10 +49,11 @@ export class AuthGuardService implements CanActivate {
         // eslint-disable-next-line deprecation/deprecation
         return combineLatest(
             this.authService.isLoggedIn,
-            this.authService.isChangePassword
+            this.authService.isChangePassword,
+            this.authService.isForgotPassword
         ).pipe(
-            map(([isLoggedIn, changePassword]: [boolean, boolean]): boolean => {
-                if (changePassword || isLoggedIn) {
+            map(([isLoggedIn, changePassword, forgotPassword]: [boolean, boolean, boolean]): boolean => {
+                if (changePassword || isLoggedIn || forgotPassword) {
                     return true;
                 } else {
                     this.router.navigate(['/login']).catch((): void => {