Add login form to coming-soon page and allow admin routes through

Coming-soon page now shows a magic link login form for unauthenticated
visitors and a wiki link + sign out for logged-in members. The
coming-soon middleware allows /admin routes through (still protected by
admin middleware). A /login redirect page ensures invite email links work.
This commit is contained in:
Jennie Robinson Faber 2026-03-19 11:01:03 +00:00
parent 772f57c2b2
commit 1024a80731
3 changed files with 127 additions and 8 deletions

View file

@ -8,11 +8,15 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
return;
}
// Allow access to the coming-soon page and OIDC login
if (to.path === "/coming-soon" || to.path === "/auth/wiki-login") {
// Allow access to the coming-soon page, OIDC login, and admin routes
if (
to.path === "/coming-soon" ||
to.path === "/auth/wiki-login" ||
to.path.startsWith("/admin")
) {
return;
}
// Redirect all other routes to coming-soon — no exceptions
// Redirect all other routes to coming-soon
return navigateTo("/coming-soon");
});