krengine-gate
v1.2.0
Published
Enterprise-grade 2FA middleware for Node.js. Authenticate web sessions directly via WhatsApp DM using dynamic access codes.
Maintainers
Readme
KrEngine Gate 🛡️
Enterprise-grade 2FA middleware for Node.js. Authenticate web dashboard sessions directly via WhatsApp DM using 6-digit dynamic access codes.
Installation
npm install krengine-gateUsage
const express = require('express');
const Gate = require('krengine-gate');
const app = express();
// Initialize the gate
const auth = Gate.middleware({
secret: 'your-jwt-secret',
bot: myBotInstance, // Your Baileys socket instance
expiry: 600000 // 10 minutes
});
app.post('/api/verify', auth, (req, res) => {
res.json({ success: true, user: req.user });
});Features
- WhatsApp Direct Delivery: Codes are sent directly to the user's phone.
- JWT Integration: Automatically generates secure tokens upon successful verification.
- Rate Limiting: Built-in protection against brute-force attempts.
- Stateless: Uses memory caching for pending codes.
Credits
Developed by ItsSkellyHer3.
