People walking along a bright corridor

Authentication

Accounts are handled by Better Auth from the first run: sign-up with email and password, verification, recovery, email changes and sessions, stored in your own Postgres database and checked on the server before any protected route answers.

A person working on a laptop at a desk

What's included

Better Auth owns passwords, cookies and sessions, so the app never stores or compares a password itself. Passwords need at least 12 characters, and cookies are marked secure in production.

Recovery, verification and email-change messages go out through Loops templates as soon as you set the keys.

  • Email and password sign-up and sign-in
  • Email verification and email changes
  • Password recovery and password changes
  • Session list with revocation
  • Account deletion that protects final owners

How it works

The auth routes live under /api/auth on the same origin as the app, and sign-in attempts are rate limited with counters kept in the database.

Deleting an account checks every organisation the user owns first: if they are its only owner, they transfer ownership or delete it before the account can go.

  1. Copy the example environment files
  2. Generate BETTER_AUTH_SECRET with openssl
  3. Set the Loops keys and templates for email
  4. Check sign-up, recovery and deletion locally
A woman pinning shapes to a glass wall

Let's Talk

Get in touch