jwt-payload-decoder

A simple, exportable function for getting the payload from a JWT (JSON Web Token).

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
jwt-payload-decoder
211.2.48 years ago8 years agoMinified + gzip package size for jwt-payload-decoder in KB

Readme

jwt-payload-decoder
A simple, exportable function for getting the payload from a JWT (JSON Web Token).
https://jwt.io/

Installation

$ npm install jwt-payload-decoder --save

Usage

Require the package in your application:
var jwtPayloadDecoder = require('jwt-payload-decoder')

Then get the payload like so:
var payload = jwtPayloadDecoder.getPayload(token)

var user = {
  email: payload.email,
  name: payload.name
}
---