Skip to content

feat: add typed Better Auth route policies - #7

Merged
kauandotnet merged 1 commit into
mainfrom
codex/better-auth-route-policy-alpha-2
Jul 31, 2026
Merged

feat: add typed Better Auth route policies#7
kauandotnet merged 1 commit into
mainfrom
codex/better-auth-route-policy-alpha-2

Conversation

@kauandotnet

Copy link
Copy Markdown
Contributor

What changed

  • adds a typed routePolicy option with normalized request context
  • evaluates policy after CORS/body recovery and before middleware/Better Auth
  • supports short-circuit Web responses and preserves direct auth.api behavior
  • covers Express and Fastify JSON, form, CORS, error, and non-execution cases
  • prepares @nestm/better-auth@0.1.0-alpha.2

Why

Station needs a Nest-owned, adapter-neutral policy seam for its deliberately narrow Better Auth HTTP surface without reintroducing a Fastify-specific mount.

Verification

  • pnpm check
  • Express suite: 144 passing
  • Fastify suite: 144 passing
  • build, pack dry-run, publint, and package-surface checks

@kauandotnet
kauandotnet merged commit 44098ee into main Jul 31, 2026
8 checks passed
@kauandotnet
kauandotnet deleted the codex/better-auth-route-policy-alpha-2 branch July 31, 2026 09:33
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