@snssoftware/readin-auth
v1.0.3
Published
Authentication service with JWT, OAuth, and email verification for Node.js/Express applications
Maintainers
Readme
@snssoftware/readin-auth
🔐 Production-ready authentication package for Node.js/Express applications with JWT, email verification, and password reset functionality.
Features
- ✅ JWT Access & Refresh Tokens
- ✅ Email Verification
- ✅ Password Reset
- ✅ Token Blacklisting
- ✅ Role-Based Access Control (RBAC)
- ✅ TypeScript Support
- ✅ Comprehensive Logging
- ✅ Custom Error Handling
Installation
npm install @snssoftware/readin-authPeer Dependencies
npm install express mongoose jsonwebtoken bcryptjsQuick Start
import { initializeAuth, authController, protect } from '@snssoftware/readin-auth';
import User from './models/User';
// Initialize with your User model
initializeAuth(User);
// Use in routes
app.post('/api/auth/register', authController.register);
app.post('/api/auth/login', authController.login);
app.get('/api/profile', protect, (req, res) => {
res.json({ user: req.user });
});Documentation
See full documentation at GitHub
License
MIT © SNS Software
