Auth Server
auth-server is a complete, production-ready, deployable authentication and account-management service built on RapidREST. It includes every strategy, model, and route from the Auth Library wired together into one runnable package, with support for either MongoDB and PostgreSQL.
It is not an npm package you install. It's a reference project you can deploy immediately using Docker or Helm, or clone/fork to make it your own. It is the fastest way to see the Auth Library's pieces assembled into a complete service rather than hand-wiring every strategy and route yourself. It also includes a complete React-based UI that implements login flow, user account management and system administration.
Auth Library is the @rapidrest/auth npm package which includes strategies, data models, base routes, and configuration you can drop into any RapidREST project. This section is about auth-server, the standalone project built on top of the @rapidrest/auth that provides a simple turn-key authentication server.
Why it exists
Wiring up a working login system from the Auth Library means picking strategies, subclassing base routes, choosing a datastore, getting configuration right for each one and building a full user interface to drive it all. auth-server does all of that already, for every supported method at once (password, TOTP, OTP, WebAuthn passkeys, FIDO2, MFA, OIDC)
With auth-server you can:
- Deploy as-is using Docker or Helm, as a standalone auth provider microservice that issues JWTs your other RapidREST services, instead of building login into every service separately.
- Fork it, keeping the wiring you need and deleting the rest, as a faster starting point than an empty
generate serverproject plus manual Auth Library integration.
What's inside
Beyond the auth routes and React UI, auth-server is a normal RapidREST service. It ships the standard Default Routes, doubling as a working example of a fully assembled RapidREST project.
| Path | What's there |
|---|---|
src/mongo/, src/sql/ | Full support for SQL or MongoDB with identical routes and behavior for each persistence backend. |
src/config.mongo.ts, src/config.sql.ts, src/config.defaults.ts | Project configuration. |
apps | The React-based frontend UI. |
docker-compose.*.yml, Dockerfile, helm/ | Deployment assets. |
test/ | A test suite covering both datastore variants. |
k6-tests/ | A collection of k6 scripts for performing load testing. |
What's next
- Building on auth-server: forking it, adding a provider, extending the models.
- React UI: sign-in, sign-up, account and admin pages, and how to build on top of them.
- Docker Compose: running it locally.
- Kubernetes (Helm): the chart, its dependencies, and every configurable
values.yamlparameter. - Auth Library: the
@rapidrest/authAPI this project is built from.