Skip to main content

Advanced Features

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

FeatureGuideDescription
SessionsISessionStoreDevice-aware session management, per-session revoke
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, vm sandboxGovern and execute JS scripts on inbound webhooks via the admin UI
Bearer TokenMobile/native clients: token storage, interceptors
Mailer (HTTP)MailerConfigBuilt-in HTTP email transport with bilingual templates
Email VerificationemailVerificationModenone / lazy / strict verification enforcement
Change EmailTwo-step email address change with confirmation link
Account DeletionDELETE /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
WebhooksWebhookSender, IWebhookStoreOutgoing webhooks with HMAC signing and retry
TelemetryITelemetryStorePersist and query identity events
Swagger / OpenAPIcreateToolsRouter()Auto-generated OpenAPI 3.0 spec + Swagger UI