await _validateAuthenticationBeforeEnter()

in src/router.js [53:66]


                await _validateAuthenticationBeforeEnter(to, from, async (val) => {
                    if (val === true) {
                        await store.dispatch("tenant/fetchTenant", {clientId: to.params.clientId});
                        const superTenant = store.getters["tenant/getTenant"]({clientId: custosService.clientId});
                        const tenant = store.getters["tenant/getTenant"]({clientId: to.params.clientId});
                        if (superTenant.hasAdminPrivileges || tenant.hasAdminPrivileges || tenant.type === "CHILD_TENANT") {
                            next(`/tenants/${to.params.clientId}/profile`);
                        } else {
                            next(`/tenants/${to.params.clientId}/child-tenants`);
                        }
                    } else {
                        next(val);
                    }
                })