docs: fix incorrect option for session in API key plugin (#5273)

This commit is contained in:
Matt Hatcher
2025-10-13 15:05:09 +00:00
committed by GitHub
parent 4b39221180
commit bcfd3c335c
+3 -3
View File
@@ -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>