diff --git a/src/app/auth/auth-config.module.ts b/src/app/auth/auth-config.module.ts index 4893324..3e1a213 100644 --- a/src/app/auth/auth-config.module.ts +++ b/src/app/auth/auth-config.module.ts @@ -1,6 +1,6 @@ import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { APP_INITIALIZER, NgModule } from '@angular/core'; -import { AuthInterceptor, AuthModule, OidcConfigService } from 'angular-auth-oidc-client'; +import { AuthInterceptor, AuthModule, LogLevel, OidcConfigService } from 'angular-auth-oidc-client'; import { TRAVEL_API_URL, USER_API_URL } from '../app.config'; export function configureAuth(oidcConfigService: OidcConfigService): () => Promise { @@ -19,7 +19,8 @@ export function configureAuth(oidcConfigService: OidcConfigService): () => Promi tokenRefreshInSeconds: 20, ignoreNonceAfterRefresh: true, // El refresh token está fallando si no se ignora el Nonce secureRoutes: [TRAVEL_API_URL, USER_API_URL], - logLevel: 1 + storage: localStorage, + logLevel: LogLevel.Warn }); } diff --git a/src/app/pages/edit-travel/edit-travel.component.ts b/src/app/pages/edit-travel/edit-travel.component.ts index a641917..f202fb4 100644 --- a/src/app/pages/edit-travel/edit-travel.component.ts +++ b/src/app/pages/edit-travel/edit-travel.component.ts @@ -22,7 +22,7 @@ export class EditTravelComponent implements OnInit { ) { } ngOnInit(): void { - this.route.queryParams.subscribe(params => { + this.route.paramMap.subscribe(params => { const travelId = params.get('id') as unknown as TravelId; this.apiService.getTravel(travelId) diff --git a/src/app/pages/travel/travel.component.ts b/src/app/pages/travel/travel.component.ts index d4a8c75..4a1497f 100644 --- a/src/app/pages/travel/travel.component.ts +++ b/src/app/pages/travel/travel.component.ts @@ -22,7 +22,7 @@ export class TravelComponent implements OnInit { ) { } ngOnInit(): void { - this.route.queryParams.subscribe(params => { + this.route.paramMap.subscribe(params => { this.travelId = this.route.snapshot.paramMap.get('id') as unknown as TravelId; this.loadTravel();