Reference

Limits and defaults

Every default, bound and timing in one place: tokens, passwords, the server, the registry, the kiosk and the audit log.

Read as Markdown

Each value was checked against the package. Where an option sets it, the option is named.

Tokens and sessions

WhatValueSet by
Token lifetime900 seconds (15 minutes). Whole seconds from 300 to 900.policies.tokenTtl
Clock skew allowed on a token5 secondsfixed
Key set (GET /api/auth/jwks) refreshEvery 5 minutes, and at once (at most every 5 seconds) for a key it does not holdfixed
Token issuer and audienceThe origin of Better Auth's base URLbaseURL, BETTER_AUTH_URL
Default profilewebprofile
Auditoffaudit
Registryoff, ownership "first-push"registry
Resources opened from Better Auth's tablesnoneresources

Passwords

WhatValueSet by
Hashargon2id, "owasp-minimum" (19 MiB, 2 passes, 1 lane)passwords.argon2id
Other profile"rfc9106-low-memory" (64 MiB, 3 passes, 4 lanes)passwords.argon2id
Salt and tag16 bytes and 32 bytesfixed
Largest hash cost a check will compute64 MiB, 3 passes, 4 lanesfixed
Longest password128 (Better Auth's default)emailAndPassword.maxPasswordLength
Scrypt hashesrefusedpasswords.legacyScrypt: true accepts them

The standalone server

WhatValueSet by
Port3000 (0 picks a free one)port, --port, PORT
Interface127.0.0.1hostname, --hostname
Largest request body1 MiB (1048576)maxBodyBytes, --max-body-bytes
Drain on close()10 seconds, then the rest are endedfixed
Health checkGET /health answers 200 {"status":"ok"}fixed
Better Auth's rate limit under avaccess serveon when NODE_ENV=production (Better Auth's own default)betterAuth.rateLimit.enabled
Migration on startoff--migrate, AVACCESS_MIGRATE

Server-side verb calls

WhatValue
Rate limit scopesignIn, signUp, resetPassword calls, with Better Auth's own rateLimit options
Failures per target before a refusal10, each within 5 minutes of the one before. A success clears the count.
Refusal lastsUntil 5 minutes have passed

The registry

WhatValue
Namespace name^[a-z][a-z0-9_-]{0,62}$
Key formatavk_push_… or avk_pull_…: 32 random bytes, base64url
Key headerx-access-key
Largest policies file1 MiB (413 over it)
Largest push body read2 MiB (413 for a declared length over it, unread)
Redirects followed by the CLInone

The kiosk

WhatValueSet by
Idle timeout300 seconds. Whole seconds from 60 to 3600.profile.idleTimeout
Device credential32 random bytes, HTTP-only cookie, kept 400 days, SameSite=Laxfixed
Freshness of an enrolling sessionBetter Auth's session.freshAge (one day by default)session.freshAge
PIN length6 to 12 digitsfixed
Wrong PINs free per user per device5, then one try per backoff that doubles from 1 minute to 1 hour (429)fixed
PIN disabled on a device after100 wrong PINs in a row (403)fixed
Device limit10 wrong PINs at once for any users, then one more every 90 secondsfixed
Replaced credential grace30 seconds (409 KIOSK_DEVICE_BUSY)fixed
Replaced credentials kept (as hashes)400 daysfixed

The audit log

WhatValue
Anonymous refusal repeatsFolded once a minute for each origin and reason (and each route and target on a sign-in)
Open windows at once10,000. Past that, the oldest is closed early.
A failing sink or writeDoes not fail the request. Better Auth's logger warns.