diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 79dd92633f33b4794ec44d99e821b8960a73b970..43a43caf0a0c23c0e615fc35307f5978ec967b2a 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -20,7 +20,7 @@ export interface ICustomRoute extends Route { const routes: ICustomRoute[] = [ { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, {path: 'callback', component: CallbackComponent}, - { path: 'dashboard', component: DashboardComponent, canActivate: [ FdpGuard], + { path: 'dashboard', component: DashboardComponent, canActivate: [ FdpGuard, AuthGuardService], children: [ { path: 'simplesearch', component: SearchComponent }, { path: 'repository', component: RepositoryComponent }, diff --git a/src/app/authentication/services/auth.service.ts b/src/app/authentication/services/auth.service.ts index 6995ed1b48fe5568886cef0f7a2b66694260eb47..80d6b8512379639fc71b08087f443e98650d572f 100644 --- a/src/app/authentication/services/auth.service.ts +++ b/src/app/authentication/services/auth.service.ts @@ -65,8 +65,7 @@ export class AuthService { login() { - - window.location.href = this.baseUrl + this.authorizationEndpoint; + window.open(this.baseUrl + this.authorizationEndpoint, '_self') ; } updateToken(token) {