Good morning community
I am new to micro frontend, currently I am building an application where all the microfrontends are made in angular and i am using the single-spa plugin to display them.
What I want is that if the user is authenticated, load the other microfrontends and if not, redirect him back to the login microfrontend, but I haven't been able to do it.
My root config file is as follows
This loads the login screen
registerApplication({
name: "@app/login",
app: () => System.import<LifeCycles>("@app/login"),
activeWhen: location => location.pathname == '/',
});
This route loads a dashboard, but if the user has not authenticated it should not load it and redirect to login
registerApplication({
name: "@app/dashboard",
app: () => System.import<LifeCycles>("@app/dashboard"),
activeWhen: location => location.pathname == '/dashboard'
});