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

options/emailandpassword

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

emailAndPassword option fields

The emailAndPassword option has the following fields: enabled (enable email and password authentication; default: false), disableSignUp (disable email and password sign up; default: false), requireEmailVerification (require email verification before session creation), minPasswordLength (minimum password length; default: 8), maxPasswordLength (maximum password length; default: 128), autoSignIn (automatically sign in user after sign up), sendResetPassword (function to send reset password email), onPasswordReset (callback triggered when password changed successfully), revokeSessionsOnPasswordReset (revoke all other sessions on password reset; default: false), resetPasswordTokenExpiresIn (seconds reset password token is valid for; default: 3600), onExistingUserSignUp (callback when sign up with already-registered email; only called when requireEmailVerification is true or autoSignIn is false; default: undefined), customSyntheticUser (function to build custom synthetic user for email enumeration protection; use when plugins add user table fields), password (object with hash and verify functions for custom password hashing and verification).

emailAndPassword example code

import { betterAuth } from "better-auth"; export const auth = betterAuth({ emailAndPassword: { enabled: true, disableSignUp: false, requireEmailVerification: true, minPasswordLength: 8, maxPasswordLength: 128, autoSignIn: true, sendResetPassword: async ({ user, url, token }) => { // Send reset password email }, resetPasswordTokenExpiresIn: 3600, // 1 hour password: { hash: async (password) => { // Custom password hashing return hashedPassword; }, verify: async ({ hash, password }) => { // Custom password verification return isValid; } } }, })

Give your agent this brain