diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 24421978d8dd0213ed1f17fe562cb4090758b527..ba2b205060bb8455fbf37642ede0862193220771 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -34,6 +34,7 @@ const routes: Routes = [ { path: 'sshauthz_callback', component: KeygenComponent}, { path: 'transfer', component: TransferComponent }, { path: 'noaccount/:site', component: NoaccountComponent}, + { path: '**', component: LauncherComponent}, //{ path: 'shareconnect', component: ShareconnectComponent } diff --git a/src/app/keygen/keygen.component.ts b/src/app/keygen/keygen.component.ts index e8add098bb0952bccfe5e8f9f5cf6c773a4181d1..0d3aa0603dd402a55d89fa2668a8c15486ef26a2 100644 --- a/src/app/keygen/keygen.component.ts +++ b/src/app/keygen/keygen.component.ts @@ -72,7 +72,13 @@ export class KeygenComponent implements OnInit, OnDestroy { switchMap((_) => of([null])), ); agent$.subscribe( (res) => this.router.navigate([sessionStorage.getItem('path')]), - (err) => { console.log(err) ; this.logout(err.sshauthzservice); this.router.navigate(['/noaccount',err.sshauthzservice.name])}) + (err) => { console.log(err) ; + if (err.sshauthzservice !== undefined ) { + this.logout(err.sshauthzservice) + this.router.navigate(['/noaccount',err.sshauthzservice.name]) + } else { + this.router.navigate(['/login'])} + } ) } extractToken(frag: string) {