a12n is short for "authentication".
The goal of this project is to provide a simple authentication system for developers. We aim to apply OAuth2 standards where applicable.
- Node.js 18.x
- MySQL, Postgres or Sqlite
Get a test server by running:
mkdir a12n-server && cd a12n-server
npx @curveball/a12n-server
This will automatically create a configuration file and sqlite database in the current directory.
Then, just open http://localhost:8531/ to create your admin account
This project has been used in production since 2018 and is still actively
developed and maintained. a12n-server
is part of a series of @curveball
packages based on modern HTTP standards.
Instead of rolling your own authentication system, you get A LOT of features for free 🪄:
- Browsable API endpoints with:
- errors and responses displayed in HTML and JSON
- HAL-formatted user resources.
- Admin UI with user permission and app management
- A flat permission model
- OAuth2 implementation
- Supported grants:
implicit
,client_credentials
,authorization_code
andpassword
. - OAuth2 discovery document.
- PKCE.
- OAuth 2 Token Introspection.
- JSON Web Key Sets.
- OAuth2 Token Revocation
- RFC 9068 - JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens.
- OAuth 2.0 Multiple Response Type Encoding Practices
- Supported grants:
- MFA
- Google Authenticator (TOTP).
- WebauthN / Yubikeys
- Registration flow with one-time passcode (OTP)
- Forgot-my-password flow
secret-token:
URI scheme