[PR #5754] [MERGED] feat: expose additional http methods #6202

Closed
opened 2026-03-13 12:50:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5754
Author: @jonathansamines
Created: 11/4/2025
Status: Merged
Merged: 11/11/2025
Merged by: @Bekacru

Base: canaryHead: feature/expose-http-methods


📝 Commits (3)

  • 8061896 chore: update integrations to support other http methods
  • b5c0e5b chore(openapi): update openapi plugin to support missing http methods
  • 5a42690 support other methods on origin check

📊 Changes

4 files changed (+33 additions, -9 deletions)

View changed files

📝 packages/better-auth/src/api/middlewares/origin-check.ts (+7 -1)
📝 packages/better-auth/src/integrations/next-js.ts (+3 -0)
📝 packages/better-auth/src/integrations/solid-start.ts (+3 -0)
📝 packages/better-auth/src/plugins/open-api/generator.ts (+20 -8)

📄 Description

Some plugins (e.g scim) require a complete CRUD to be exposed via REST endpoints. This means, we need to support: GET, POST, PUT, PATCH and DELETE across supported integrations at the very least.

Additionally, the openapi plugin does not currently support rendering anything but GET and POST, so I am also updating it to support the additional methods.


Summary by cubic

Expose PATCH, PUT, and DELETE in Next.js and SolidStart handlers, extend the OpenAPI generator to include these methods, and apply origin checks to mutating requests. Enables plugins like scim to offer full REST CRUD.

  • New Features
    • Next.js and SolidStart handlers now support GET, POST, PATCH, PUT, DELETE.
    • OpenAPI generator adds DELETE, PATCH, and PUT operations and merges with existing path methods to avoid overwrites.
    • Origin check middleware now runs for POST, PATCH, PUT, DELETE; skipped for GET, OPTIONS, HEAD.

Written for commit 5a42690572. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5754 **Author:** [@jonathansamines](https://github.com/jonathansamines) **Created:** 11/4/2025 **Status:** ✅ Merged **Merged:** 11/11/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `feature/expose-http-methods` --- ### 📝 Commits (3) - [`8061896`](https://github.com/better-auth/better-auth/commit/8061896e8d7762aa6647e070cf0e4b3a33113637) chore: update integrations to support other http methods - [`b5c0e5b`](https://github.com/better-auth/better-auth/commit/b5c0e5b5adf9e4e2c495c9741462eb64d623ff6f) chore(openapi): update openapi plugin to support missing http methods - [`5a42690`](https://github.com/better-auth/better-auth/commit/5a426905723012e89840a34f52846978053eaf6a) support other methods on origin check ### 📊 Changes **4 files changed** (+33 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/middlewares/origin-check.ts` (+7 -1) 📝 `packages/better-auth/src/integrations/next-js.ts` (+3 -0) 📝 `packages/better-auth/src/integrations/solid-start.ts` (+3 -0) 📝 `packages/better-auth/src/plugins/open-api/generator.ts` (+20 -8) </details> ### 📄 Description Some plugins (e.g `scim`) require a complete CRUD to be exposed via REST endpoints. This means, we need to support: `GET`, `POST`, `PUT`, `PATCH` and `DELETE` across supported integrations at the very least. Additionally, the `openapi` plugin does not currently support rendering anything but `GET` and `POST`, so I am also updating it to support the additional methods. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Expose PATCH, PUT, and DELETE in Next.js and SolidStart handlers, extend the OpenAPI generator to include these methods, and apply origin checks to mutating requests. Enables plugins like scim to offer full REST CRUD. - **New Features** - Next.js and SolidStart handlers now support GET, POST, PATCH, PUT, DELETE. - OpenAPI generator adds DELETE, PATCH, and PUT operations and merges with existing path methods to avoid overwrites. - Origin check middleware now runs for POST, PATCH, PUT, DELETE; skipped for GET, OPTIONS, HEAD. <sup>Written for commit 5a426905723012e89840a34f52846978053eaf6a. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:50:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#6202