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 · Plugins · all subjects

autumn/setup

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.

Autumn plugin basic setup

Import autumn from autumn-js/better-auth and add it to the plugins array in betterAuth config: import { autumn } from "autumn-js/better-auth"; export const auth = betterAuth({ plugins: [autumn()] });

Autumn plugin with organization scope

When using the organization plugin with Autumn, pass customerScope: "organization" to the autumn() config: import { autumn } from "autumn-js/better-auth"; import { organization } from "better-auth/plugins"; export const auth = betterAuth({ plugins: [organization(), autumn({ customerScope: "organization" })] });

Autumn plugin with user and organization scope

To support billing at both user and organization levels, pass customerScope: "user_and_organization" to the autumn() config: autumn({ customerScope: "user_and_organization" })

Autumn plugin with custom identify function

For custom customer identification, pass an identify async function to autumn() config that returns an object with customerId and customerData fields containing name and email: autumn({ identify: async ({ session, organization }) => ({ customerId: "your_customer_id", customerData: { name: "Customer Name", email: "customer@gmail.com" } }) })

AutumnProvider React component setup

Wrap the application with AutumnProvider component and pass useBetterAuth={true} prop in the root layout file: import { AutumnProvider } from "autumn-js/react"; export default function RootLayout({ children }) { return <html><body><AutumnProvider useBetterAuth={true}>{children}</AutumnProvider></body></html>; }

Give your agent this brain