mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 19:44:52 +00:00
Fix accepting invite while logged out
This commit is contained in:
@@ -75,8 +75,6 @@ export const Route = createFileRoute("/_restrict-login-signup")({
|
||||
middlewares: [stripSearchParams({ callback_port: undefined, force: 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" });
|
||||
@@ -94,6 +92,8 @@ export const Route = createFileRoute("/_restrict-login-signup")({
|
||||
|
||||
setAuthToken(data.token);
|
||||
|
||||
if (location.pathname === "/signupinvite") return;
|
||||
|
||||
// Avoid redirect if on select-organization page with force=true
|
||||
if (location.pathname.endsWith("select-organization") && search?.force === true) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user