await _validateAuthenticationBeforeEnter()

in src/router.js [202:226]


                await _validateAuthenticationBeforeEnter(to, from, next)
            },
            component: () =>
                import(/*webpackChunkName:"account"*/  "./lib/components/pages/TenantEntity")
        },
        {
            path: "*",
            name: "notFound",
            component: () =>
                import(/*webpackChunkName:"users"*/  "./lib/components/pages/404")
        }
    ]
})

async function _validateAuthenticationBeforeEnter(to, from, next) {
    await store.dispatch('auth/fetchUserinfo');
    const authenticated = store.getters['auth/authenticated'];

    if (!authenticated) {
        // next(true);
        next('/');
    } else {
        const username = store.getters["auth/currentUsername"];

        if (!store.getters["user/getUser"]({username, clientId: custosService.clientId})) {