AuthHive is a lightweight, reusable microservice that provides secure and scalable user authentication for your SaaS products. Whether you're building an internal tool or offering login/signup APIs for external clients, AuthHive handles it all — with simplicity and security at its core.
- 🔐 JWT Authentication
- 📧 Email & Password Login/Signup
- 🔁 Password Reset & Recovery
- 📨 Email Verification via Token
- 🛡️ CSRF & XSRF Protection
- 🧱 RethinkDB & Hapi.js Based
- Backend Framework: Hapi.js
- Database: RethinkDB
- Token Management: JWT
- Security: CSRF, XSRF protection
GET /api/auth/csrf-token
Returns a fresh CSRF token for secured form submissions.
POST /api/auth/signup
Registers a new user with
username
, andpassword
.
POST /api/auth/login
Authenticates user using email/password and returns JWT.
POST /api/auth/forgot-password
Sends a reset token to the registered email.
POST /api/auth/reset-password
Resets user password using valid token.
POST /api/auth/send-verification-token
Sends a verification email/token to a user.
POST /api/auth/verify-token
Verifies the token and marks email as verified.
- Internal login system for your SaaS dashboard(s)
- Shared authentication across multiple microservices
- External API authentication for third-party clients
- All routes protected against CSRF and XSRF attacks
- Passwords are securely hashed using industry-standard algorithms
- Rate-limiting and brute-force protection ready to plug in
- 🔁 Refresh Tokens
- 📱 2FA (Two-Factor Authentication)
- ⚙️ Admin Dashboard
- 📊 Usage Analytics
Use this with reverse proxies like Nginx and HTTPS to ensure full-stack security in production!
Made with 💛 by Mehyab
MIT License – Free for commercial and personal use.