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

This reverts commit 4c377f640d.
This commit is contained in:
Alex Yang
2025-08-26 16:46:10 -07:00
parent f4c4112a82
commit e90fa38e78
6 changed files with 3 additions and 112 deletions

View File

@@ -22,15 +22,6 @@ export const auth = betterAuth({
});
```
And in your auth client as well:
```ts title="auth-client.ts"
import { bearerClient } from "better-auth/client/plugins";
export const authClient = createAuthClient({
plugins: [bearerClient()]
});
```
## How to Use Bearer Tokens
### 1. Obtain the Bearer Token
@@ -66,6 +57,7 @@ export const authClient = createAuthClient({
});
```
You may want to clear the token based on the response status code or other conditions:
### 2. Configure the Auth Client
@@ -145,6 +137,3 @@ export async function handler(req, res) {
## Options
**requireSignature** (boolean): Require the token to be signed. Default: `false`.
**cookieName** (string): Custom cookie name for the temporary bearer token confirmation cookie. Default: `"bearer-token-confirmation"`.
(For more information, [read here](https://github.com/better-auth/better-auth/pull/4123))