diff --git a/src/app/core/auth/auth.service.ts b/src/app/core/auth/auth.service.ts index 530fb51720..751927f24e 100644 --- a/src/app/core/auth/auth.service.ts +++ b/src/app/core/auth/auth.service.ts @@ -54,13 +54,13 @@ export class AuthService { // If current route is different from the one setted in authentication guard // and is not the login route, clear redirect url and messages - const routeUrlObs = this.store.select(routerStateSelector) + const routeUrl$ = this.store.select(routerStateSelector) .filter((routerState: RouterReducerState) => isNotUndefined(routerState) && isNotUndefined(routerState.state)) .filter((routerState: RouterReducerState) => !this.isLoginRoute(routerState.state.url)) .map((routerState: RouterReducerState) => routerState.state.url); - const redirectUrlObs = this.getRedirectUrl(); - routeUrlObs.pipe( - withLatestFrom(redirectUrlObs), + const redirectUrl$ = this.store.select(getRedirectUrl).distinctUntilChanged(); + routeUrl$.pipe( + withLatestFrom(redirectUrl$), map(([routeUrl, redirectUrl]) => [routeUrl, redirectUrl]) ).filter(([routeUrl, redirectUrl]) => isNotEmpty(redirectUrl) && (routeUrl !== redirectUrl)) .subscribe(() => { @@ -329,7 +329,6 @@ export class AuthService { this.getRedirectUrl() .first() .subscribe((redirectUrl) => { - console.log('Browser'); if (isNotEmpty(redirectUrl)) { this.clearRedirectUrl(); diff --git a/src/app/core/auth/server-auth.service.ts b/src/app/core/auth/server-auth.service.ts index 1d240455f3..8ecf692e9e 100644 --- a/src/app/core/auth/server-auth.service.ts +++ b/src/app/core/auth/server-auth.service.ts @@ -58,7 +58,6 @@ export class ServerAuthService extends AuthService { this.getRedirectUrl() .first() .subscribe((redirectUrl) => { - console.log('server side'); if (isNotEmpty(redirectUrl)) { // override the route reuse strategy this.router.routeReuseStrategy.shouldReuseRoute = () => { diff --git a/src/app/shared/services/server-cookie.service.ts b/src/app/shared/services/server-cookie.service.ts index d6d706a7d7..49cc738346 100644 --- a/src/app/shared/services/server-cookie.service.ts +++ b/src/app/shared/services/server-cookie.service.ts @@ -14,7 +14,6 @@ export class ServerCookieService extends CookieService implements ICookieService } public get(name: string): any { - console.log(this.req.connection.remoteAddress); try { return JSON.parse(this.req.cookies[name]) } catch (err) {