Skip to content
Validates a passed JWT token based on the RFC 7519 standard
JavaScript
Branch: master
Clone or download
Pull request Compare This branch is 8 commits ahead of entwicklerstube:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
index.js
mocha.js
package.json
test.js
yarn.lock

README.md

Is JWT Valid

Pass a JWT token and get a boolean if the token is valid, the requirements for a valid token are defined by the official RFC 7519 standard

Zero Dependencies

Install

npm

npm install is-jwt-valid

yarn

yarn add is-jwt-valid

Usage

isJwtValid(JWT_TOKEN<STRING>)

Example

isJwtValid('this is no valid token') // returns false
isJwtValid('some.valid.token')   // returns true

Support

Browser Under the hood it uses the window.atob() native feature which is supported in each major browser and IE from version 10 (check mozilla dev site)

Node Uses the native Buffer API from node (check node documentation)

You can’t perform that action at this time.