export const routes: Routes = [
{
path: 'monday',
component: FullComponent,
children: [
{ path: 'dashboard', component: DashboardComponent, canActivate: [AuthGuard] },
]
},
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: '**', redirectTo: '/home' }
]
It worked, thanks!
Thanks for the clear explanation! It helped immensely!!
Just one question, out of curiosity: is the “silent-check-sso.html” page the best way to solve the periodic auth checks? It looks like a weird way to implement that functionality… (not criticizing, just curious)
Hello and thank you for your message!
When the check-sso is enabled, our browser will perform the full redirect to the Keycloak server and back to our application within a hidden iframe, saving our application’s resources from needing to be loaded and parsed twice: once during app initialization and once more following the redirect from Keycloak back to our application. This is the main benefit of this approach. In order for this to happen, we must provide the static HTML asset at the address specified in silentCheckSsoRedirectUri in order for Keycloak to be able to interact through the iframe.
Hey! And thanks for the great help!
I am still receiving 401 Errors after a succesful login after my redirection to the site. Can you provide help there?
Hi and thank you for your comment!
The usual cause of this problem is the Authorization token missing in the requests. That’s why I would suggest that you verify that the Authorization token is present first and then, verify the configuration your backend is using.
It is a common, standard way to do this. It looks weird, but is kind of a limitation of current web technology and current security protocols that there is no “cleaner” way to do this (AFAIK).