Node Jwt Simple

JWT(JSON Web Token) encode and decode module for node.js
Alternatives To Node Jwt Simple
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Jwt7,0606,8175356 days ago53February 25, 20237bsd-3-clausePHP
A simple library to work with JSON Web Token and JSON Web Signature
Pyjwt4,6929,4432,19212 days ago48July 18, 202318mitPython
JSON Web Token implementation in Python
5 months ago89mitC
Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket
Node Jwt Simple1,3207,8286462 years ago13March 30, 201933mitJavaScript
JWT(JSON Web Token) encode and decode module for node.js
Vault Ui1,29915 years ago3October 04, 201750otherJavaScript
Vault-UI — A beautiful UI to manage your Vault, written in React
3 months ago6April 10, 20217mitGo
Program to convert lines of text into a tree structure.
Token Lists1,1623877 days ago33July 05, 2023185mitTypeScript
📚 The Token Lists specification
Spring Boot Jwt1,022
2 years agomitJava
JWT auth service using Spring Boot, Spring Security and MySQL
6 years agomitJava
webapp用户身份认证方案 JSON WEB TOKEN 实现Deme示例,Java版
Jwt Cpp666
a month ago5June 22, 202238mitC++
A header only library for creating and validating json web tokens in c++
Alternatives To Node Jwt Simple
Select To Compare

Alternative Project Comparisons


JWT(JSON Web Token) encode and decode module for node.js.


$ npm install jwt-simple


let jwt = require('jwt-simple');
let payload = { foo: 'bar' };
let secret = 'xxx';

// HS256 secrets are typically 128-bit random strings, for example hex-encoded:
// let secret = Buffer.from('fe1a1915a379f3be5394b64d14794932', 'hex')

// encode
let token = jwt.encode(payload, secret);

// decode
let decoded = jwt.decode(token, secret);
console.log(decoded); //=> { foo: 'bar' }

decode params

 * jwt.decode(token, key, noVerify, algorithm)

// decode, by default the signature of the token is verified
let decoded = jwt.decode(token, secret);
console.log(decoded); //=> { foo: 'bar' }

// decode without verify the signature of the token,
// be sure to KNOW WHAT ARE YOU DOING because not verify the signature
// means you can't be sure that someone hasn't modified the token payload
let decoded = jwt.decode(token, secret, true);
console.log(decoded); //=> { foo: 'bar' }

// decode with a specific algorithm (not using the algorithm described in the token payload)
let decoded = jwt.decode(token, secret, false, 'HS256');
console.log(decoded); //=> { foo: 'bar' }


By default the algorithm to encode is HS256.

The supported algorithms for encoding and decoding are HS256, HS384, HS512 and RS256.

// encode using HS512
jwt.encode(payload, secret, 'HS512')
Popular Token Projects
Popular Json Projects
Popular Security Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.