Skip to content

feat(den): use Better Auth active org context#1485

Merged
src-opn merged 3 commits into
devfrom
task/session-token-based-org-context
Apr 18, 2026
Merged

feat(den): use Better Auth active org context#1485
src-opn merged 3 commits into
devfrom
task/session-token-based-org-context

Conversation

@src-opn
Copy link
Copy Markdown
Collaborator

@src-opn src-opn commented Apr 18, 2026

Summary

  • seed Den sessions with Better Auth activeOrganizationId and move org-scoped API access from :orgId routes to session-backed /v1/org/... endpoints
  • switch Den web and the OpenWork app to call Better Auth organization/set-active when users change orgs, while keeping the dashboard rooted at /dashboard
  • update app-side Den client calls to the new session-scoped endpoints and keep org selection aligned across sign-in, templates, skills, providers, and workers

Verification

  • pnpm --filter @openwork-ee/den-api build
  • pnpm --filter @openwork-ee/den-web build
  • pnpm --filter @openwork/app typecheck
  • Chrome DevTools MCP: signed up, created two orgs, switched orgs, and confirmed the Den dashboard stayed on /dashboard

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment Apr 18, 2026 4:37am
openwork-den Ready Ready Preview, Comment Apr 18, 2026 4:37am
openwork-den-worker-proxy Ready Ready Preview, Comment Apr 18, 2026 4:37am
openwork-landing Ready Ready Preview, Comment, Open in v0 Apr 18, 2026 4:37am
openwork-share Ready Ready Preview, Comment Apr 18, 2026 4:37am

@src-opn src-opn merged commit ac41d58 into dev Apr 18, 2026
14 checks passed
benjaminshafii pushed a commit that referenced this pull request May 15, 2026
* feat(den): use Better Auth active org context

* fix(app): switch Better Auth org only on explicit actions

* refactor(den): flatten active org resource routes

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
benjaminshafii pushed a commit that referenced this pull request May 15, 2026
* feat(den): use Better Auth active org context

* fix(app): switch Better Auth org only on explicit actions

* refactor(den): flatten active org resource routes

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
@benjaminshafii benjaminshafii deleted the task/session-token-based-org-context branch May 15, 2026 17:39
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.

1 participant