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

commet/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.

Commet API key setup

Add your Commet API key to the environment as COMMET_API_KEY=ck_... Use the sandbox API key while developing and the live key in production. Commet determines the environment from the key itself.

Commet server-side configuration example

Server-side setup example: ```typescript import { betterAuth } from "better-auth"; import { commet, portal, subscriptions, features, usage, seats, } from "@commet/better-auth"; import { Commet } from "@commet/node"; const commetClient = new Commet({ apiKey: process.env.COMMET_API_KEY!, }); export const auth = betterAuth({ // ... Better Auth config plugins: [ commet({ client: commetClient, createCustomerOnSignUp: true, use: [ portal({ returnUrl: "/dashboard" }), subscriptions(), features(), usage(), seats(), ], }), ], }); ``` This shows how to initialize the Commet client with an API key and configure it with multiple sub-plugins.

Commet client-side configuration example

Client-side setup example: ```typescript import { createAuthClient } from "better-auth/react"; import { commetClient } from "@commet/better-auth/client"; export const authClient = createAuthClient({ plugins: [commetClient()], }); ``` This initializes the Better Auth client with the Commet client plugin to interact with Commet functionalities.

Commet plugin configuration options

Commet plugin accepts: client (required, Commet SDK instance), use (required, array of sub-plugins), createCustomerOnSignUp (optional, automatically create customer on signup), getCustomerCreateParams (optional, custom function returning {fullName, domain, metadata}).

Commet customer automatic creation

When createCustomerOnSignUp is enabled, a Commet customer is automatically created when a new user signs up. The customer is created with its id set to the Better Auth user ID, so no mapping between users and Commet customers is needed.

Give your agent this brain