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

session & auth

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.

Sign up with Better Auth email

Call authClient.signUp.email({ email, password, name }) to sign up a user with email and password. The name field should be included in the request.

Sign in with Better Auth email

Call authClient.signIn.email({ email, password }) to sign in a user with email and password.

Get user session with Better Auth

Use authClient.useSession() to retrieve the current user session and any associated error.

Supabase to Better Auth user migration process

The migration script retrieves users and identities from Supabase auth tables, then creates corresponding user records in Better Auth with mapped fields: user.id maps to id, user.email to email, user.raw_user_meta_data.avatar_url to image, user.email_confirmed_at to emailVerified (boolean), user.is_super_admin to role (admin or existing role), user.created_at to createdAt, user.updated_at to updatedAt, and user.is_anonymous to isAnonymous. For each identity, if the provider is 'email', a credential account is created with the encrypted_password field. For other supported social providers, account records are created with the provider's identity data.

User migration invalidates active sessions

Migrating users from Supabase Auth to Better Auth will invalidate all active sessions. Users will need to sign in again after the migration is complete.

Give your agent this brain