Skip to content

feat(auth): integrate Clerk for single-tenant deployments - #17

Merged
moshloop merged 3 commits into
mainfrom
feat/clerk-authentication
Sep 7, 2026
Merged

moshloop merged 3 commits into
mainfrom
feat/clerk-authentication

Conversation

@adityathebe

@adityathebe adityathebe commented Sep 5, 2026 •

Copy link
Copy Markdown
Member

Relates to #9.

  • Add Clerk sign-in, automatic organization activation, and a user menu using runtime public configuration.
  • Protect API requests with Clerk session verification and the deployment’s configured organization; all accepted members have equal access.
  • Require all three Clerk settings together, preserving unauthenticated local use when none are set. No database or RBAC changes.

Draft pending Clerk credentials and resolution of the existing Prowler/commons-db compilation mismatch.

Uninvited User

image

User with an invitation

image

@adityathebe
adityathebe force-pushed the feat/clerk-authentication branch from ef5de09 to bd25a2c Compare September 5, 2026 02:59
Add Clerk sign-in and organization activation to the UI, with runtime public configuration and a user menu. Verify sessions and the configured organization at the API boundary, including cookie authentication for same-origin requests and event streams.

Require all three Clerk settings together while retaining unauthenticated local use when none are set. All organization members have equal access; no local user tables or role policy are introduced.
A same-site sibling origin can trigger authenticated mutations using the browser session cookie despite SameSite=Lax.

Apply the standard library cross-origin check after session and organization verification, returning a JSON 403 for rejected requests. No origin allowlist or Bearer-specific bypass is needed.
@adityathebe
adityathebe force-pushed the feat/clerk-authentication branch from c8d4dad to 0280c5c Compare September 7, 2026 04:11
Keep sign-in and sign-up on the Recon origin using Clerk prebuilt components. Route pending organization selection for existing members through the tenant gate while preserving other session tasks and the built-in zero-membership warning.

Provide direct sign-out for denied users, allow tall auth forms to scroll, and document the required organization-creation policy and invitation redirect.
@adityathebe
adityathebe marked this pull request as ready for review September 7, 2026 05:37
@moshloop
moshloop merged commit f1580d1 into main Sep 7, 2026
7 checks passed
@adityathebe
adityathebe deleted the feat/clerk-authentication branch September 8, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants