Remove Auth

For remove authentication from your template follow some steps

Remove below authentication code

Open File : resources/ts/plugins/1.router/guards.ts

if (!canNavigate(to) && to.matched.length) {
      // Get query string - fallback to getting it directly from URL if reactive value is empty
      let currentQueryString = queryString.value;
      if (!currentQueryString && typeof window !== "undefined") {
        const params = new URLSearchParams(window.location.search);
        currentQueryString = params.toString() ? `?${params.toString()}` : "";
      }

      // Build the full URL properly
      let fullUrl = to.fullPath;

      // Add query string if we have one and it's not already in the URL
      if (currentQueryString) {
        const queryParams = currentQueryString.startsWith("?")
          ? currentQueryString.substring(1)
          : currentQueryString;
        if (queryParams && !to.fullPath.includes(queryParams)) {
          const separator = to.fullPath.includes("?") ? "&" : "?";
          fullUrl = `${to.fullPath}${separator}${queryParams}`;
        }
      }

      return isLoggedIn
        ? { path: "/" }
        : {
            path: `/authentication/auth1/login1`,
            query: {
              ...to.query,
              to: to.fullPath !== "/" ? fullUrl : undefined,
            },
          };
    }

Then check your pages, it is working properly without authentication

Last updated