plugins/api_key library
API key management: create, list, update, and revoke keys.
Requires the apiKey() plugin on your Better Auth server. Importing this
library adds an apiKey getter to BetterAuthClient.
Classes
- ApiKey
- An API key.
- BetterAuthApiKey
-
Typed wrapper for the Better Auth
apiKey()plugin routes. - CreateApiKeyBody
- Body for creating an API key.
- UpdateApiKeyBody
- Body for updating an API key.
Extensions
- ApiKeyExtension on BetterAuthClient
- ApiKeyPatterns on ApiKey
- Adds pattern-matching-related methods to ApiKey.
- CreateApiKeyBodyPatterns on CreateApiKeyBody
- Adds pattern-matching-related methods to CreateApiKeyBody.
- UpdateApiKeyBodyPatterns on UpdateApiKeyBody
- Adds pattern-matching-related methods to UpdateApiKeyBody.