Commit a0d21294 authored by Chris Hines's avatar Chris Hines
Browse files

fix some routing bugs

parent 63de0fdd
Pipeline #11588 passed with stages
in 3 minutes and 32 seconds
......@@ -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 }
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment