[PR #6103] [CLOSED] fix: missing urlencoded media type #6446

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6103
Author: @dvanmali
Created: 11/19/2025
Status: Closed

Base: canaryHead: mediaTypeFix


📝 Commits (1)

  • f2840d6 fix: missing urlencoded media type

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/api/index.ts (+4 -1)

📄 Description

Revert breaking. Add "application/x-www-form-urlencoded" for router oauth endpoints such as token.


Summary by cubic

Add application/x-www-form-urlencoded to the router’s allowed media types so OAuth endpoints (e.g., /token) accept urlencoded requests. This fixes failed token exchanges from providers that post form data.

Written for commit f2840d6d67. 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/6103 **Author:** [@dvanmali](https://github.com/dvanmali) **Created:** 11/19/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `mediaTypeFix` --- ### 📝 Commits (1) - [`f2840d6`](https://github.com/better-auth/better-auth/commit/f2840d6d675bd125bceb4e7b1ec4ec064286936b) fix: missing urlencoded media type ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/index.ts` (+4 -1) </details> ### 📄 Description Revert breaking. Add "application/x-www-form-urlencoded" for router oauth endpoints such as token. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Add application/x-www-form-urlencoded to the router’s allowed media types so OAuth endpoints (e.g., /token) accept urlencoded requests. This fixes failed token exchanges from providers that post form data. <sup>Written for commit f2840d6d675bd125bceb4e7b1ec4ec064286936b. 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:59:39 -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#6446