Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Auth

Atlantus can scaffold auth-oriented routes and uses runtime helpers for passwords and tokens/sessions.

Scaffold

atlantus new my-api --with-auth
cd my-api

Production secret

When ATL_ENV=production, set a strong secret:

export ATL_ENV=production
export ATL_AUTH_SECRET="long-random-secret"
atlantus start --path .

Local dev can omit production env; never ship with a default secret.

Typical routes

Scaffolds and sample apps often expose:

  • POST /auth/register
  • POST /auth/login
  • GET /me (authenticated)

Open the generated app/routes/ files after --with-auth — that is the supported copy-paste base.

Practices

  • Hash passwords only via runtime helpers (never roll your own)
  • Prefer the scaffold’s token/session flow
  • Rate-limit login in production when helpers are available

Next: Jobs.