Moneyflow ID
Core Concepts

Authentication & Roles (ADR 0002)

How Authula manages accounts, cookie sessions, and access control.

Per ADR 0002, Authula is the single source of truth for identity, sessions, and RBAC inside the dedicated authula PostgreSQL schema:

  • Browser apps authenticate with HttpOnly cookie sessions (credentials: "include" / Axios withCredentials: true).
  • State-changing requests are protected by origin-based CSRF verification (CrossOriginCSRF).
  • Default roles (Admin and User) are bootstrapped on API startup. New sign-ups automatically receive the User role.
  • GET /v1/auth/role returns the authenticated caller's assigned roles so admin-ui enforces Admin access cleanly.