Overview
TheInviteOptions type defines the configuration interface for the invite plugin. It provides comprehensive control over invitation behavior, permissions, token generation, email sending, and lifecycle hooks.
For detailed documentation of each option, see the Options page.
Type Definition
NewInviteOptions Type
Internal type with required defaults:NewInviteOptions type is used internally after applying defaults from resolveInviteOptions.
Usage
Basic Configuration
With Type Safety
Extending with Custom Schema
Related Types
- Permissions - Permission configuration type
- InviteType - Invitation data structure
TokensType-"token" | "code" | "custom"UserWithRole- Better Auth user with role informationGenericEndpointContext- Better Auth endpoint context
Source Code Reference
Type definition:src/types.ts:5-303
NewInviteOptions: src/types.ts:307-321
Related
- Options - Detailed documentation of each option
- invite() - Main plugin function
- InviteType - Invitation data structure
- Permissions - Permission configuration