new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Better Auth · all subjects

better auth/configuration

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Better Auth trustedOrigins configuration for Encore

Add 'trustedOrigins' array to Better Auth config to allow requests from specific origins. When requests come from different origins, they are blocked by default.

Fastify trustedOrigins configuration

Requests from different origins are blocked by default. Add trusted origins to the auth instance using the trustedOrigins option with an array of URLs, for example: betterAuth({ trustedOrigins: ["http://localhost:3000", "https://example.com"] }).

DATABASE_URL environment variable for Nitro

Set DATABASE_URL in .env file to point to the database location. For sqlite development, use: DATABASE_URL="file:./dev.db"

Basic Better Auth configuration with PlanetScale PostgreSQL

A minimal Better Auth configuration for PlanetScale PostgreSQL includes: baseURL set to the application URL (e.g., http://localhost:3000), database initialized as a new Pool with the DATABASE_URL connection string, and emailAndPassword authentication enabled.

Better Auth configuration example with pg Pool

Example configuration: ```ts import { Pool } from "pg"; import { betterAuth } from "better-auth"; export const auth = betterAuth({ baseURL: "http://localhost:3000", database: new Pool({ connectionString: process.env.DATABASE_URL, }), emailAndPassword: { enabled: true, }, }); ```

Give your agent this brain

better auth/configuration — Better Auth