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/session

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.

session option fields

The session option has the following fields: modelName (model name for session; default: 'sessions'), fields (map fields to different column names), expiresIn (expiration time for session token in seconds; default: 604800 - 7 days), updateAge (how often session should be refreshed in seconds; default: 86400 - 1 day), disableSessionRefresh (disable session refresh so session is not updated regardless of updateAge; default: false), additionalFields (additional fields for session table), storeSessionInDatabase (store session in database when secondary storage provided; default: false), preserveSessionInDatabase (preserve session records in database when deleted from secondary storage; default: false), cookieCache (object with enabled boolean and maxAge in seconds to enable caching session in cookie).

session example code

import { betterAuth } from "better-auth"; export const auth = betterAuth({ session: { modelName: "sessions", fields: { userId: "user_id" }, expiresIn: 604800, // 7 days updateAge: 86400, // 1 day disableSessionRefresh: true, // Disable session refresh so that the session is not updated regardless of the `updateAge` option. (default: `false`) additionalFields: { // Additional fields for the session table customField: { type: "string", } }, storeSessionInDatabase: true, // Store session in database when secondary storage is provided (default: `false`) preserveSessionInDatabase: false, // Preserve session records in database when deleted from secondary storage (default: `false`) cookieCache: { enabled: true, // Enable caching session in cookie (default: `false`) maxAge: 300 // 5 minutes } }, })

Give your agent this brain