Tired of copy-pasting the same auth logic in every project? Me too. So I built NodeAuthβa no-fluff, production-ready backend auth starter powered by JWT, cookies, and MongoDB.
π What It Solves
We all know the drill: you're spinning up a new project and boomβtime to set up login, register, token refresh, logout... again. π©
NodeAuth handles that headache for you.
Whether you're:
- Bootstrapping your next SaaS
- Learning backend auth flows
- Building a side project fast
This gives you a plug-and-play foundation with best practices already baked in.
βοΈ Key Features
- π JWT Access + Refresh Token Flow
- πͺ Cookie-based auth (goodbye localStorage vulnerabilities)
- π§ Argon2 hashing (because Bcrypt is great, but Argon2 is π₯)
- π§ͺ Optional tests via Vitest + Supertest
- π§± Clean, scalable folder structure
π Tech Stack
- Node.js (Express)
- MongoDB (Mongoose)
- Argon2
- JWT
- Vitest + Supertest
π§ Want to Learn?
The code is open-source, well-commented, and built to be easy to extend.
Check out:
- π§΅ Full folder breakdown
- π Auth flow from register β refresh β logout
- βοΈ Future-proof tips (adding Google OAuth, role-based access)
π Repo & Blog
π¬ Feedback?
Use it, break it, fork it, improve itβIβd love to hear from you.
Leave a comment or connect on LinkedIn or talhabilal.dev
Letβs make backend auth less painful together. β
Top comments (0)