I'm using Azure AD with implicit flow with an Angular 4 app. My NG4 app is using PathLocationStrategy for routing so that it can take advantage of the clean urls. My AAD auth request looks like this:
The authorization passes and I'm redirected to http://localhost:4200/login#id_token=xxxxx which then gets redirected to http://localhost:4200/home#id_token=xxxxx
I have routes that looks like this:
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{
path: '', component: BlankLayoutComponent,
children: [
{ path: 'login#id_token=:id_token', component: LoginComponent }
]
},
{
path: '', component: BasicLayoutComponent,
children: [
{ path: 'home', component: StarterViewComponent }
]
},
// Handle all other routes
{ path: '**', redirectTo: 'home' }
I can't seem to get a route configured that will grab the id_token from the url so I can use it for authorizing other requests. How can I get this id_token back from the redirection?