[PR #4245] [MERGED] Revert "fix(bearer): certain sign-in endpoints won't give bearer token (#4123) #30878

Closed
opened 2026-04-17 21:52:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4245
Author: @himself65
Created: 8/26/2025
Status: Merged
Merged: 8/26/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/08/26/revert


📝 Commits (1)

  • b376595 Revert "fix(bearer): certain sign-in endpoints won't give bearer token (#4123)"

📊 Changes

6 files changed (+3 additions, -112 deletions)

View changed files

📝 docs/content/docs/plugins/bearer.mdx (+1 -12)
📝 packages/better-auth/src/adapters/kysely-adapter/test/state.txt (+1 -1)
📝 packages/better-auth/src/client/plugins/index.ts (+0 -1)
packages/better-auth/src/plugins/bearer/client.ts (+0 -17)
📝 packages/better-auth/src/plugins/bearer/index.ts (+1 -76)
📝 packages/better-auth/src/test-utils/test-instance.ts (+0 -5)

📄 Description

This reverts commit 4c377f640d.

Discussed with Bekacru, the code doesn't work for people with cookies don't work.


Summary by cubic

Reverts the bearer plugin cookie-based handoff introduced in #4123. Restores the header-based bearer token flow and removes the client plugin and temporary endpoint.

  • Bug Fixes

    • Removed the temporary cookie flow and the /get-bearer-token endpoint.
    • Removed bearerClient from client exports and tests.
    • Continued exposing set-auth-token via Access-Control-Expose-Headers.
    • Updated docs to remove the client plugin snippet and the cookieName option.
  • Migration

    • Remove bearerClient() from createAuthClient plugins.
    • Read the token from the set-auth-token response header.

🔄 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/4245 **Author:** [@himself65](https://github.com/himself65) **Created:** 8/26/2025 **Status:** ✅ Merged **Merged:** 8/26/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/08/26/revert` --- ### 📝 Commits (1) - [`b376595`](https://github.com/better-auth/better-auth/commit/b376595175ae5fe08c0590d9d5d43c6abd02035c) Revert "fix(bearer): certain sign-in endpoints won't give bearer token (#4123)" ### 📊 Changes **6 files changed** (+3 additions, -112 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/bearer.mdx` (+1 -12) 📝 `packages/better-auth/src/adapters/kysely-adapter/test/state.txt` (+1 -1) 📝 `packages/better-auth/src/client/plugins/index.ts` (+0 -1) ➖ `packages/better-auth/src/plugins/bearer/client.ts` (+0 -17) 📝 `packages/better-auth/src/plugins/bearer/index.ts` (+1 -76) 📝 `packages/better-auth/src/test-utils/test-instance.ts` (+0 -5) </details> ### 📄 Description This reverts commit 4c377f640d454133672f2f46d1a2a314e52492a7. Discussed with Bekacru, the code doesn't work for people with cookies don't work. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Reverts the bearer plugin cookie-based handoff introduced in #4123. Restores the header-based bearer token flow and removes the client plugin and temporary endpoint. - **Bug Fixes** - Removed the temporary cookie flow and the /get-bearer-token endpoint. - Removed bearerClient from client exports and tests. - Continued exposing set-auth-token via Access-Control-Expose-Headers. - Updated docs to remove the client plugin snippet and the cookieName option. - **Migration** - Remove bearerClient() from createAuthClient plugins. - Read the token from the set-auth-token response header. <!-- 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-04-17 21:52:49 -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#30878