forked from auth0/node-jsonwebtoken
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Dylan Keys edited this page Aug 1, 2025
·
2 revisions
Welcome to the comprehensive documentation for the jsonwebtoken
library - a TypeScript implementation of JSON Web Tokens for Node.js.
- Installation & Setup - How to install and configure the library
- Quick Start Guide - Get up and running in minutes
-
v10.0.0 Breaking Changes
β οΈ - Migrate from v9 to v10 (Promise-based API) - v8 to v9 Migration - Previous migration guide
- v7 to v8 Migration - Previous migration guide
- jwt.sign() - Create JSON Web Tokens
- jwt.verify() - Validate and decode tokens
- jwt.decode() - Decode without verification
- Usage Examples - Common use cases and patterns
- TypeScript Examples - Type-safe JWT handling
- Error Handling - Handle JWT errors properly
- Supported Algorithms - Algorithm reference and security warnings
- Security Best Practices - Keep your JWTs secure
- Token Expiration Strategies - Managing token lifetimes
- Refreshing JWTs - Token refresh patterns
- Dynamic Key Resolution - Using key callbacks
- Custom Headers - Adding custom JWT headers
Version 10.0.0 brings major improvements:
- Promise-based API - Modern async/await support
- TypeScript - Complete rewrite in TypeScript
- Better Performance - Improved error handling and cleaner stack traces
- Enhanced Security - 'none' algorithm requires explicit opt-in
Learn more about v10 changes β
- NPM Package
- GitHub Repository
- Issue Tracker
- JWT.io - JWT Debugger and Resources
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the MIT license. See the LICENSE file for more info.