Hono
Hono is a fast, lightweight web framework for edge runtimes.Installation
Setup
Adapter Implementation
The Hono adapter converts Hono’sContext to a universal request format:
src/adapters/hono.ts
SvelteKit
SvelteKit is a framework for building web applications with Svelte.Installation
Setup
Adapter Implementation
The SvelteKit adapter handles SvelteKit’sRequestEvent:
src/adapters/svelte-kit.ts
Remix
Remix is a full-stack web framework focused on web standards.Installation
Setup
Adapter Implementation
The Remix adapter works with Remix’s loader and action functions:src/adapters/remix.ts
Nuxt
Nuxt is the intuitive Vue framework for building web applications.Installation
Setup
Adapter Implementation
The Nuxt adapter works with Nuxt’s h3 event handlers:src/adapters/nuxt.ts
Configuration Examples
With Access Control
All frameworks support the same configuration options:studio.config.ts
With Event Tracking
studio.config.ts
Framework Comparison
| Framework | Import Path | Route Type | Handler Type |
|---|---|---|---|
| Next.js | better-auth-studio/nextjs | Catch-all API route | (request: Request) => Response |
| Express | better-auth-studio/express | Express middleware | Router |
| Hono | better-auth-studio/hono | Hono handler | (c: Context) => Response |
| SvelteKit | better-auth-studio/svelte-kit | Server route | (event: RequestEvent) => Response |
| Remix | better-auth-studio/remix | Resource route | ({ request }) => Response |
| Nuxt | better-auth-studio/nuxt | Server API route | (event) => Response |
Troubleshooting
Import Errors
If you get import errors, ensure you’re using the correct adapter path:TypeScript Errors
For framework-specific TypeScript errors, install the framework’s type definitions:Route Not Found
Ensure the catch-all route pattern is correct for your framework:- SvelteKit:
[...path]/+server.ts - Remix:
$.ts(splat route) - Nuxt:
[...all].ts
Next Steps
Configuration
Learn about all configuration options
Next.js Setup
Set up with Next.js