Fix invite problem on backend

This commit is contained in:
x032205
2025-06-03 21:06:48 -04:00
parent b7b36a475d
commit aa049dc43b
5 changed files with 10 additions and 28 deletions
@@ -74,6 +74,8 @@ export const Route = createFileRoute("/_restrict-login-signup")({
middlewares: [stripSearchParams({ callback_port: undefined })]
},
beforeLoad: async ({ context, location, search }) => {
if (location.pathname === "/signupinvite") return;
if (!context.serverConfig.initialized) {
if (location.pathname.endsWith("/admin/signup")) return;
throw redirect({ to: "/admin/signup" });
@@ -91,8 +93,6 @@ export const Route = createFileRoute("/_restrict-login-signup")({
setAuthToken(data.token);
if (location.pathname === "/signupinvite") return;
// to do cli login
if (search?.callback_port) {
if (location.pathname.endsWith("select-organization") || location.pathname.endsWith("login"))