Auth Plugins
Automatically create customers in Autumn when a user signs up with our Next.js authentication plugins
Autumn provides authentication plugins that make it easy to integrate with popular auth providers. Instead of manually finding and passing customer IDs, you can use our auth plugins to automatically sync the customer information.
Configuration Options
The auth plugin configuration accepts the following fields:
provider
: The authentication provider to use (“better-auth”, “supabase”, or “clerk”)instance
: For better-auth, your server-side auth instanceuseOrg
: Set totrue
if you want to use organizations as Autumn customers instead of individual users
This config is passed to the <AutumnProvider />
component that wraps your Next.js application.
Providers
Better-Auth
For Better Auth integration, first import your auth instance:
Supabase Auth
Supabase does not support organizations, so useOrg
is not supported for
Supabase.
Make sure you’re using the default variable names in your .env.local file:
NEXT_PUBLIC_SUPABASE_URL
and NEXT_PUBLIC_SUPABASE_ANON_KEY
.
Clerk
Make sure you’re using the default variable names in your .env.local file:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
and CLERK_SECRET_KEY
.