diff --git a/packages/nc-gui-v2/middleware/auth.global.ts b/packages/nc-gui-v2/middleware/auth.global.ts index ea761d1c7a..d5f35e2317 100644 --- a/packages/nc-gui-v2/middleware/auth.global.ts +++ b/packages/nc-gui-v2/middleware/auth.global.ts @@ -47,6 +47,11 @@ export default defineNuxtRouteMiddleware(async (to, from) => { /** if auth is required or unspecified (same as required) and user is not signed in, redirect to signin page */ if ((to.meta.requiresAuth || typeof to.meta.requiresAuth === 'undefined') && !state.signedIn.value) { + /** If this is the first usern navigate to signup page directly */ + if (state.appInfo.value.firstUser) { + return navigateTo('/signup') + } + return navigateTo('/signin') } else if (to.meta.requiresAuth === false && state.signedIn.value) { /**