auth-events
v1.2.0
Published
A lightweight Node.js library to track and react to authentication events across any auth provider.
Downloads
1,104
Maintainers
Readme
Auth Events
auth-events is a lightweight, powerful, and extensible Node.js library to handle authentication and user-related events in your application. It provides an event-driven architecture for login, logout, registration, password changes, role updates, device tracking, risk signals, and more.
auth-events is a lightweight, powerful, and extensible Node.js library to handle authentication and user-related events in your application. It provides an event-driven architecture for login, logout, registration, password changes, role updates, device tracking, risk signals, and more.
Designed for security, audit, and automation, it works with any auth provider (custom, Google, Firebase, Auth0, etc.) and can power your enterprise-grade authentication workflows.
Features
- 🔹 Core Auth Events: login, logout, register, password changes, role updates
- 🔹 Security & Risk Events: suspicious login, brute force detection, IP/device risk, geo-velocity
- 🔹 Session & Token Lifecycle: session creation, expiration, token issued/revoked/refresh
- 🔹 Device & Trust Tracking: new device detection, device trust/untrust
- 🔹 Multi-Factor & Verification Events: OTP, 2FA, email/phone verification
- 🔹 Update/Change Tracking: profile updates, email/phone changes, previous and new values
- 🔹 Audit & Meta: requestId, correlationId, custom metadata
- 🔹 Developer-Friendly Context: logger, db, cache, env injected into handlers
- 🔹 Decision-Aware Handlers: handlers can allow, block, or challenge actions
- 🔹 Enterprise Ready: support for admin actions, automation, security scoring
documentation
https://auth-events-web.vercel.app/
Keep Coding Keep Exploring
