TODO: move auth check into root-config
Closed this issue · 1 comments
For this example, I think the auth check should be moved into root-config as part of the application's activityFn
. That way the applications don't even load if you're not authenticated. Its not bad per se (all of the assets are public anyway!) but seems a little "more correct" as well as having a slight perf benefit. (or is it? Since an unauthenticated user will need to download the home app anyway after logging in...) In any case, that would mean replacing the single-spa-layout definitions with registerApplication
s because single-spa-layout route
s are currently limited to only using a path
and nothing more.
I implemented this on check-auth-in-root-config
as a separate branch and have made note of it in the README.