mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 04:19:32 +00:00
Revert "fix(bearer): certain sign-in endpoints won't give bearer token (#4123)"
This reverts commit 4c377f640d.
This commit is contained in:
@@ -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))
|
||||
Reference in New Issue
Block a user