Skip to main content
The AutumnProvider component wraps your React application and provides the Autumn client to all hooks.
Learn how to setup Autumn hooks in the Getting Started guide.

Usage

Parameters

string
Base URL for your backend server (e.g., https://api.example.com). Defaults to current origin. Set this when your backend is hosted on a separate domain.
string
Path prefix for Autumn routes. Defaults to /api/autumn, or /api/auth/autumn if useBetterAuth is true.
boolean
Use better-auth integration. Sets pathPrefix to /api/auth/autumn and includeCredentials to true.
boolean
Include credentials (cookies) in cross-origin requests. Defaults to true if useBetterAuth is true.
QueryClient
Custom TanStack Query client. Uses a default client if not provided.
boolean
If true, suppresses console warnings and logs.