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.
Unified · Split
| @@ -40,9 +40,8 @@ CONVEX_SITE_URL=https://your-deployment.convex.site · 39 unmodified lines | ||
| 40 | 40 | # EXECUTOR_WEB_PORT=5312 |
| 41 | 41 | # ASSISTANT_PORT=3002 |
| 42 | 42 | |
| 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 | |
| 46 | 45 | |
| 47 | 46 | # ── Discord bot (optional — omit to skip bot startup) ── |
| 48 | 47 | # DISCORD_BOT_TOKEN=... |
| @@ -12,7 +12,7 @@ import { · 11 unmodified lines | ||
| 12 | 12 | DialogTitle, |
| 13 | 13 | } from "@/components/ui/dialog"; |
| 14 | 14 | import { useSession } from "@/lib/session-context"; |
| 15 | −import { anonymousDemoEnabled, workosEnabled } from "@/lib/auth-capabilities"; | |
| 15 | +import { workosEnabled } from "@/lib/auth-capabilities"; | |
| 16 | 16 | |
| 17 | 17 | const localSetupCommands = [ |
| 18 | 18 | "curl -fsSL https://executor.sh/install | bash", |
| @@ -85,13 +85,10 @@ export function NoOrganizationModal({ enabled }: { enabled: boolean }) { · 66 unmodified lines | ||
| 85 | 85 | variant="outline" |
| 86 | 86 | className="w-full" |
| 87 | 87 | onClick={handleCreateAnonymousOrganization} |
| 88 | − disabled={creatingAnonymousOrganization || !anonymousDemoEnabled} | |
| 88 | + disabled={creatingAnonymousOrganization} | |
| 89 | 89 | > |
| 90 | 90 | {creatingAnonymousOrganization ? "Creating anonymous organization..." : "Create anonymous organization"} |
| 91 | 91 | </Button> |
| 92 | − {!anonymousDemoEnabled ? ( | |
| 93 | − <p className="text-xs text-muted-foreground">Anonymous organization creation is disabled.</p> | |
| 94 | − ) : null} | |
| 95 | 92 | <div className="relative py-1"> |
| 96 | 93 | <div className="absolute inset-0 flex items-center"> |
| 97 | 94 | <div className="w-full border-t border-border/60" /> |
| @@ -1,2 +1 @@ | ||
| 1 | 1 | export const workosEnabled = Boolean(process.env.NEXT_PUBLIC_WORKOS_CLIENT_ID); |
| 2 | −export const anonymousDemoEnabled = process.env.NEXT_PUBLIC_EXECUTOR_ALLOW_ANON_DEMO !== "0"; | |
| @@ -10,7 +10,7 @@ import { · 9 unmodified lines | ||
| 10 | 10 | } from "react"; |
| 11 | 11 | import { useMutation, useQuery as useConvexQuery } from "convex/react"; |
| 12 | 12 | import { useQuery as useTanstackQuery } from "@tanstack/react-query"; |
| 13 | −import { anonymousDemoEnabled, workosEnabled } from "@/lib/auth-capabilities"; | |
| 13 | +import { workosEnabled } from "@/lib/auth-capabilities"; | |
| 14 | 14 | import { useWorkosAuthState } from "@/lib/convex-provider"; |
| 15 | 15 | import { convexApi } from "@/lib/convex-api"; |
| 16 | 16 | import { |
| @@ -198,10 +198,6 @@ export function SessionProvider({ children }: { children: ReactNode }) { · 181 unmodified lines | ||
| 198 | 198 | }, []); |
| 199 | 199 | |
| 200 | 200 | const createAnonymousOrganization = useCallback(async () => { |
| 201 | − if (!anonymousDemoEnabled) { | |
| 202 | − throw new Error("Anonymous organization creation is disabled"); | |
| 203 | − } | |
| 204 | − | |
| 205 | 201 | setRuntimeError(null); |
| 206 | 202 | setCreatingAnonymousOrganization(true); |
| 207 | 203 | try { |