Auth and workspace model
WorkOS sessions, organization membership, and owner-only capabilities
WorkOS sessions, organization membership, and owner-only capabilities
The main Panicly web app uses WorkOS for identity and sealed cookie sessions. The chatbot app uses a separate NextAuth and guest-session model.
OAuth and identity provider for the main web/dashboard app.
Sealed cookie session, not a database-backed session.
Includes userId, workosUserId, organizationId, email, and accessToken.
Workspace ownership is inferred from insertion order: the earliest organization user row is treated as owner and later rows as members.
Owner-only writes include billing, provider keys, API key management, workspace controls, project creation, and onboarding completion.
Only the workspace owner can manage billing, secrets, keys, and workspace controls.
The web auth callback can seal a bootstrap session and redirect to /onboarding?setup=database when Supabase schema or network access is unavailable.