Setup Better Auth with React
First, follow the complete Better Auth Installation Guide to set up authentication in your React app.
Then proceed to Better Auth Basic Usage to create login and sign-up pages.This will guide you through:
- Creating Better Auth tables and schemas
- Setting up your React app with Better Auth
- Configuring environment variables
- Creating
auth.ts, mounting the handler, and client instance
Setup the Better Auth JWT Plugin
In your Then migrate or generate your database to add the JWT tables.
auth.ts file, add the JWT plugin:Add Environment Variables
Register JWKS in Chipi Dashboard
Register your Better Auth JWKS endpoint in the Chipi Dashboard:
- Go to Configure > Auth Provider
- Select Better Auth as your provider
- Enter your application URL (the dashboard will auto-detect
/api/auth/jwks) - Click Verify & Save
