- Implement user sign-in, sign-up, and account management using better-auth - Add rate limiting for TTS API with daily character limits for authenticated and anonymous users - Integrate SQLite and PostgreSQL database support for user sessions and data persistence - Update UI components to include authentication flows, user menu, and privacy popup - Modify Dockerfile and package.json for new dependencies and entrypoint script - Bump version to v1.3.0
11 lines
No EOL
360 B
TypeScript
11 lines
No EOL
360 B
TypeScript
import { auth } from "@/lib/server/auth"; // path to your auth file
|
|
import { toNextJsHandler } from "better-auth/next-js";
|
|
|
|
const handlers = auth
|
|
? toNextJsHandler(auth)
|
|
: {
|
|
POST: async () => new Response("Auth disabled", { status: 404 }),
|
|
GET: async () => new Response("Auth disabled", { status: 404 })
|
|
};
|
|
|
|
export const { POST, GET } = handlers; |