One auth library. Twenty-plus frameworks. The same five lines of glue everywhere.
mindmap
root)Better-Auth(
Full-Stack
::icon(fa fa-cube)
Next.js
TanStack Start
React Router 7
SvelteKit
Nuxt
Astro
SolidStart
Waku
Backend
::icon(fa fa-server)
Express
Hono
Fastify
Elysia
NestJS
Nitro
Platform
::icon(fa fa-mobile)
Electron
Expo
Convex
Encore
Lynx
import { createAPIFileRoute } from '@tanstack/start/api' import { auth } from '~/lib/auth' export const Route = createAPIFileRoute( '/api/auth/$' )({ GET: ({ request }) => auth.handler(request), POST: ({ request }) => auth.handler(request), })
import { auth } from '@/lib/auth' import { toNextJsHandler } from 'better-auth/next-js' export const { GET, POST } = toNextJsHandler(auth.handler) // app/api/auth/[...all]/route.ts
import { Hono } from 'hono' import { auth } from './lib/auth' const app = new Hono() app.on(['POST', 'GET'], '/api/auth/*', (c) => auth.handler(c.req.raw) )
import express from 'express' import { auth } from './lib/auth' import { toNodeHandler } from 'better-auth/node' const app = express() app.all('/api/auth/*', toNodeHandler(auth) )