mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-25 10:13:54 -05:00
docs: fix incorrect option for session in API key plugin (#5273)
This commit is contained in:
@@ -384,7 +384,7 @@ Any time an endpoint in Better Auth is called that has a valid API key in the he
|
||||
export const auth = betterAuth({
|
||||
plugins: [
|
||||
apiKey({
|
||||
sessionForAPIKeys: true,
|
||||
enableSessionForAPIKeys: true,
|
||||
}),
|
||||
],
|
||||
});
|
||||
@@ -725,9 +725,9 @@ Customize the rate-limiting.
|
||||
|
||||
Custom schema for the API key plugin.
|
||||
|
||||
`disableSessionForAPIKeys` <span className="opacity-70">`boolean`</span>
|
||||
`enableSessionForAPIKeys` <span className="opacity-70">`boolean`</span>
|
||||
|
||||
An API Key can represent a valid session, so we automatically mock a session for the user if we find a valid API key in the request headers.
|
||||
An API Key can represent a valid session, so we can mock a session for the user if we find a valid API key in the request headers. Default is `false`.
|
||||
|
||||
`permissions` <span className="opacity-70">`{ defaultPermissions?: Statements | ((userId: string, ctx: GenericEndpointContext) => Statements | Promise<Statements>) }`</span>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user