Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jwt-check-expiry

vipin084.6kMIT1.0.10TypeScript support: included

check JWT is expired or not.

jwt, expire, json, web, token, decode, expiration, check, expiration, verify, jwt, expiration, exp, isexpired, expired, jwtexpired, expiry

readme

jwt-check-expiry

Purpose

Check weather JWT is expired in the client without requiring a secret.

Installation

npm i jwt-check-expiry

or

yarn add jwt-check-expiry

Usage

import isJwtTokenExpired, { decode } from 'jwt-check-expiry';

console.log('isExpired is:', isJwtTokenExpired('<your-jwt-token>'));

console.log('Decoded token :', decode('<your-jwt-token>'));