Prerequisites
Before you begin, make sure you have:- A running instance of the application (
npm run dev) - An API key from the dashboard
Configure authentication
1
Install the SDK
Add the authentication SDK to your project:
2
Initialize the client
Create an auth client with your API key:
auth.ts
3
Protect a route
Use the middleware to require authentication:
middleware.ts
Verify it works
After completing the setup, test that authentication is working:Common issues
Session expires immediately
Session expires immediately
The default session duration is 24 hours. You can extend it in the client configuration:
Next steps
Components
See all available components for your pages.
Customization
Configure your site’s look and feel.