History

remove anonymous demo gating in web ui

Always allow anonymous organization creation in local/workos-off flows and remove the stale MCP_ENABLE_ANONYMOUS_OAUTH env hint so config reflects real MCP OAuth settings.

Rhys Sullivan committed 8 months ago

Commit 13acf051 parent f80371e4 files · +5 −14Browse files

Unified · Split

4 files
  1. .env.example +2 −3
  2. executor/apps/web/src/components/no/organization-modal.tsx +2 −5
  3. executor/apps/web/src/lib/auth-capabilities.ts +0 −1
  4. executor/apps/web/src/lib/session-context.tsx +1 −5
.env.example+2−3
@@ -40,9 +40,8 @@ CONVEX_SITE_URL=https://your-deployment.convex.site · 39 unmodified lines
4040 # EXECUTOR_WEB_PORT=5312
4141 # ASSISTANT_PORT=3002
4242
43−# ── MCP OAuth (optional) ──
44−# Set to 1 to enable self-issued anonymous OAuth even without WorkOS auth.
45−# MCP_ENABLE_ANONYMOUS_OAUTH=1
43+# ── MCP OAuth for /mcp (optional) ──
44+# MCP_AUTHORIZATION_SERVER=https://your-authkit-domain.authkit.app
4645
4746 # ── Discord bot (optional — omit to skip bot startup) ──
4847 # DISCORD_BOT_TOKEN=...
executor/apps/web/src/components/no/organization-modal.tsx+2−5
@@ -12,7 +12,7 @@ import { · 11 unmodified lines
1212 DialogTitle,
1313 } from "@/components/ui/dialog";
1414 import { useSession } from "@/lib/session-context";
15−import { anonymousDemoEnabled, workosEnabled } from "@/lib/auth-capabilities";
15+import { workosEnabled } from "@/lib/auth-capabilities";
1616
1717 const localSetupCommands = [
1818 "curl -fsSL https://executor.sh/install | bash",
@@ -85,13 +85,10 @@ export function NoOrganizationModal({ enabled }: { enabled: boolean }) { · 66 unmodified lines
8585 variant="outline"
8686 className="w-full"
8787 onClick={handleCreateAnonymousOrganization}
88− disabled={creatingAnonymousOrganization || !anonymousDemoEnabled}
88+ disabled={creatingAnonymousOrganization}
8989 >
9090 {creatingAnonymousOrganization ? "Creating anonymous organization..." : "Create anonymous organization"}
9191 </Button>
92− {!anonymousDemoEnabled ? (
93− <p className="text-xs text-muted-foreground">Anonymous organization creation is disabled.</p>
94− ) : null}
9592 <div className="relative py-1">
9693 <div className="absolute inset-0 flex items-center">
9794 <div className="w-full border-t border-border/60" />
executor/apps/web/src/lib/auth-capabilities.ts+0−1
@@ -1,2 +1 @@
11 export const workosEnabled = Boolean(process.env.NEXT_PUBLIC_WORKOS_CLIENT_ID);
2−export const anonymousDemoEnabled = process.env.NEXT_PUBLIC_EXECUTOR_ALLOW_ANON_DEMO !== "0";
executor/apps/web/src/lib/session-context.tsx+1−5
@@ -10,7 +10,7 @@ import { · 9 unmodified lines
1010 } from "react";
1111 import { useMutation, useQuery as useConvexQuery } from "convex/react";
1212 import { useQuery as useTanstackQuery } from "@tanstack/react-query";
13−import { anonymousDemoEnabled, workosEnabled } from "@/lib/auth-capabilities";
13+import { workosEnabled } from "@/lib/auth-capabilities";
1414 import { useWorkosAuthState } from "@/lib/convex-provider";
1515 import { convexApi } from "@/lib/convex-api";
1616 import {
@@ -198,10 +198,6 @@ export function SessionProvider({ children }: { children: ReactNode }) { · 181 unmodified lines
198198 }, []);
199199
200200 const createAnonymousOrganization = useCallback(async () => {
201− if (!anonymousDemoEnabled) {
202− throw new Error("Anonymous organization creation is disabled");
203− }
204−
205201 setRuntimeError(null);
206202 setCreatingAnonymousOrganization(true);
207203 try {