A tiny, battle‑tested Node.js library for generating and sending OTPs, issuing JWTs, revoking tokens and managing sessions (memory or Redis).
npm i auth-verify
Tip: Use auth.setSender({...}) to configure email/sms/telegram or auth.register.sender() to add a custom transmitter.
const token = await auth.jwt.sign({ userId: 123 }, '1h')
await auth.jwt.verify(token)
auth.otp.generate(6).set('user@example.com')
await auth.otp.message({ to: 'user@example.com' })
await auth.otp.verify({ check: 'user@example.com', code: '123456' })
// register a custom sender
auth.register.sender('console', async ({to, code}) => console.log('deliver', to, code))
await auth.use('console').send({ to: '+998901234567', code: '123456' })