Skip to main content

Introduction

nauth-toolkit is a framework-agnostic authentication library for Node.js. It runs inside your application as an embedded library—not a SaaS service, proxy, or microservice. Authentication logic executes in your process, using your database and infrastructure. Add complete authentication to NestJS, Express, Fastify, or any Node.js framework without vendor lock-in.

Under Active Development

nauth-toolkit is under active development. API may change frequently.

Live Demo

See nauth-toolkit in action at demo.nauth.dev — a working demo app showcasing signup, login, MFA, social auth, and session management.

Ready to start? Check out Quick Start to configure nauth-toolkit.

Features

Authentication Methods

Identifier & Password

Signup/login with configurable password policies, reset flows, email and phone verification

Social Login

Google, Apple, Facebook OAuth with web redirect and native mobile token flows

Multi-Factor Authentication

TOTP authenticator apps, SMS codes, WebAuthn passkeys, backup recovery codes

Adaptive Security

Risk-based MFA triggered by login context, location changes, new devices

Security & Compliance

Rate Limiting & Lockouts

Per-IP and per-user limits with configurable account lockout policies

Token Security

Refresh token rotation, reuse detection, distributed locks, optimistic locking

CSRF Protection

Cookie-based token delivery with automatic CSRF safeguards

Audit Trail

Comprehensive logging for logins, MFA, password changes, security events

Session & Device Management

Device Tracking

Device ID, name, type for each session with fingerprinting

IP Geolocation

Track login locations using MaxMind GeoIP2 for risk analysis

Session Modes

Single, limited concurrent, or unlimited sessions

Trusted Devices

Remember device to bypass MFA on known hardware

Session Revocation

Manual or policy-based automatic invalidation

JWT Tokens

Bearer tokens with configurable algorithms (HS256, RS256) and expiration

Cookie Tokens

HttpOnly secure cookies with CSRF protection

Hybrid Token Management

HttpOnly cookies or header tokens on same backend. Best of both for web and mobile

Developer Experience

Challenge-Based Architecture

Multi-step flows with unified API. Returns challenge states (not errors) for verification, MFA, password changes

Email Templates

Handlebars templates with file-based customization, global variables, custom helpers

Logger Integration

Winston, Pino, or NestJS logger compatible. Automatic PII redaction, structured logging

Lifecycle Hooks

Extensible hooks at signup, login, MFA triggers, sign-in blocks

Infrastructure Adapters

Storage

Memory (dev), Database (single-server), Redis with cluster (production)

Databases

PostgreSQL and MySQL via TypeORM

Email

Console (dev), Nodemailer SMTP, AWS SES, Gmail

SMS

Console (dev), AWS SNS, Twilio (planned)

Framework Support

Backend integrations plug into your Node.js server; client SDKs run in the browser or mobile app and talk to your nauth-toolkit API.

Backend (Node.js)

FrameworkStatusPackage
NestJSFull adapter@nauth-toolkit/nestjs
ExpressFull adapter@nauth-toolkit/express
FastifyFull adapter@nauth-toolkit/fastify

Frontend (Client SDKs)

SDKStatusPackage
Client SDKFramework-agnostic@nauth-toolkit/client
AngularFull adapter@nauth-toolkit/client-angular

The Client SDK (@nauth-toolkit/client) is framework-agnostic and can be used with React, Vue, Svelte, and other TypeScript-based frontends. The Angular package builds on the Client SDK and adds Angular-specific services and wiring.

Why nauth-toolkit?

vs SaaS Authentication Providers

What you gain:

  • Complete control over code and data
  • No vendor lock-in or usage-based pricing
  • Customize flows without limitations
  • Data in your database, your infrastructure
  • No additional costs

What you trade:

  • You manage infrastructure and security audits
  • No managed compliance certifications (HIPAA, SOC2)
  • Limited to Node.js ecosystem

When to Choose nauth-toolkit

  • Need full control over auth logic
  • Want predictable infrastructure costs
  • Require deep customization
  • Building on Node.js (NestJS, Express, Fastify)

GitHub & Community

ResourceLink
Live demodemo.nauth.dev
Source codegithub.com/noorixorg/nauth-toolkit
Sample applicationsgithub.com/noorixorg/nauth
npm packagesnpmjs.com/org/nauth-toolkit
Discussions & supportgithub.com/noorixorg/nauth/discussions
Bug reportsgithub.com/noorixorg/nauth/issues

License: Early Access License — free for commercial and non-commercial use | Version: v0.1.0 | Status: Active Development