Skip to main content

Advanced Features

awesome-node-auth provides optional interfaces and hooks for advanced functionality. Every feature is opt-in — only configure what you need.

FeatureGuideDescription
SessionsISessionStoreExternal persistence for auditing and admin-level revocation
IdP ModeIdProviderConfigRS256-signed JWTs + JWKS endpoint — act as a central Identity Provider
Roles & PermissionsIRolesPermissionsStoreRBAC — assign roles, permissions, tenant-scoped
Multi-TenancyITenantStoreTenant CRUD, user↔tenant association
CSRF ProtectionAuthConfig.csrfDouble-submit cookie pattern
User MetadataIUserMetadataStoreArbitrary per-user key/value data
Account LinkingILinkedAccountsStoreLink multiple OAuth providers to one account
Admin PanelcreateAdminRouter()Built-in admin dashboard (HTML UI + REST API)
Dynamic Inbound Webhooks@webhookAction, ActionRegistry, node:vmGovern and execute JS scripts on inbound webhooks via the admin UI; scripts run with the server's privileges, so only trusted operators may write them
Bearer Token—Mobile/native clients: token storage, interceptors
Mailer (HTTP)MailerConfigBuilt-in HTTP email transport with bilingual templates
Email VerificationemailVerificationModenone / lazy / strict verification enforcement
Change Email—Two-step email address change with confirmation link
Account Deletion—DELETE /auth/account + tenant cleanup
Custom JWT ClaimsbuildTokenPayloadEmbed tenant IDs, permissions, feature flags in JWT
AuthEventBusAuthEventBusCentral event bus — subscribe to 26 standardised identity events
API KeysApiKeyService, IApiKeyStoreMachine-to-machine API key authentication with bcrypt hashing
AuthToolsAuthToolsUnified entry point for telemetry, SSE, and webhooks
SSESseManagerReal-time Server-Sent Events streaming by topic
Scaling SSERedis pub/sub adapterBroadcast SSE events across multiple instances or a Kubernetes cluster
Real-time Decorators@sseNotifyFire real-time notifications from any service or store method
WebhooksWebhookSender, IWebhookStoreOutgoing webhooks with HMAC signing and retry
TelemetryITelemetryStorePersist and query identity events
Swagger / OpenAPIcreateToolsRouter()Auto-generated OpenAPI 3.0 spec + Swagger UI
Browser Clientwindow.AwesomeNodeAuthZero-config JS client shipped as auth.js — CSRF, auto-refresh, guards, all auth methods
Built-in UIbuildUiRouter()Server-rendered login/register pages — activation, CSS variables, full customization guide
CORS & Dynamic siteUrlAuthConfig.corsCross-domain setups and per-caller siteUrl resolution for emails and redirects
Extending InterfacesBaseUser, BaseTenant, SessionAdd custom fields to the base types with full TypeScript safety