Skip to content

feat: Nitro v3 compatibility#87

Draft
productdevbook wants to merge 5 commits intonuxt-modules:mainfrom
productdevbook:feature/new-branch
Draft

feat: Nitro v3 compatibility#87
productdevbook wants to merge 5 commits intonuxt-modules:mainfrom
productdevbook:feature/new-branch

Conversation

@productdevbook
Copy link

@productdevbook productdevbook commented Jan 26, 2026

Summary

  • Replace deprecated createError with new HTTPError() across server files
  • Update getRouteRules call signature to use (method, path) instead of (event)
  • Use event.req.method instead of deprecated getMethod(event)

Fixes #86

Changed Files

  • src/runtime/server/middleware/route-access.ts
  • src/runtime/server/utils/session.ts
  • src/runtime/server/api/_better-auth/sessions.delete.ts

Test plan

  • Verify middleware correctly applies route rules
  • Verify session utilities throw proper HTTP errors
  • Verify session deletion endpoint works correctly

@vercel
Copy link
Contributor

vercel bot commented Jan 26, 2026

@productdevbook is attempting to deploy a commit to the maximogarciamartinez's projects Team on Vercel.

A member of the Team first needs to authorize it.

@productdevbook productdevbook changed the title fix: update deprecated h3 APIs for Nitro v3 compatibility feat: Nitro v3 compatibility Jan 26, 2026
@productdevbook productdevbook marked this pull request as draft January 26, 2026 20:35
@vercel
Copy link
Contributor

vercel bot commented Jan 27, 2026

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

Project Deployment Review Updated (UTC)
nuxt-better-auth-docs Error Error Jan 27, 2026 6:01am

@productdevbook
Copy link
Author

@onmax I just added this. better-auth:client:extend

@onmax
Copy link
Collaborator

onmax commented Feb 5, 2026

Hey @productdevbook, nice work on this PR. Just checked, and I like the direction :). could you split out everything not directly tied to Nitro v3 compatibility? I’d keep this PR focused on the nitro/* import changes + getRouteRules/request handling updates.

Move to separate PR:

  • better-auth:client:extend feature (hooks types + module hook + defineClientAuth/useUserSession changes)
  • .nuxtrc
  • auth.config.ts + server/auth.config.ts (if just examples)

If you’d rather, I can extract these into a separate PR.

@productdevbook
Copy link
Author

It would be good if you could separate them because I'll be away from nuxt for 2-3 months.

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.

nuxt v5 ve nitro 3

2 participants