Skip to content

feat(types): infer nitro auth endpoint routes#195

Open
onmax wants to merge 4 commits intomainfrom
feat/nitro-auth-endpoint-types-194
Open

feat(types): infer nitro auth endpoint routes#195
onmax wants to merge 4 commits intomainfrom
feat/nitro-auth-endpoint-types-194

Conversation

@onmax
Copy link
Collaborator

@onmax onmax commented Feb 26, 2026

Summary

  • add generated Nitro InternalApi augmentation for /api/auth/* endpoint-level inference while keeping runtime route registration as /api/auth/**
  • export typed endpoint helpers from #nuxt-better-auth (AuthApiInternalRoutes, AuthApiEndpointPath, AuthApiEndpointMethod, AuthApiEndpointResponse)
  • add regression fixture and test for plugin/core endpoint inference (/api/auth/customer/state, /api/auth/get-session)
  • update docs examples to rely on inferred endpoint payload types
  • include current workspace playground and lockfile updates in this PR as requested

Tests

  • pnpm vitest run test/infer-nitro-endpoints-types.test.ts test/infer-plugins-types.test.ts

Closes #194

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 26, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nuxt-modules/better-auth/@onmax/nuxt-better-auth@195

commit: 9de1ebb

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.

typed nitro route inference for /api/auth endpoints

1 participant