authcascade
v1.5.26
Published
managing authentication tokens, including generation, validation, and refresh workflows.
Readme
AuthCascade
AuthCascade is a lightweight, flexible, and secure authentication module for Node.js applications. It provides easy-to-use methods for user authentication, session management, and integration with various authentication strategies.
Features
- Simple API for user authentication
- Supports JWT, OAuth, and local strategies
- Secure password hashing
- Session management
- Middleware for easy integration with Express.js
- Extensible for custom authentication workflows
Installation
npm install authcascade
const authCascade = require('authcascade');
const auth = new authCascade({
secret: 'your-secret-key', // used for JWT signing
});
// Authenticate user
auth.login(username, password)
.then(user => {
console.log('Authenticated user:', user);
})
.catch(err => {
console.error('Authentication failed:', err);
});