
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
jsonwebtoken-helper
Advanced tools
A helper that aims to easily manage multiple secrets for your tokens.
A helper that aims to easily manage multiple secrets for your tokens.
npm install --save jsonwebtoken-helper
yarn add jsonwebtoken-helper
const jwtHelper = require('jsonwebtoken-helper').default;
or with ES6
import jwtHelper from 'jsonwebtoken-helper';
const payload = {
name: 'John Doe'
};
const text = jwtHelper.sign(payload);
const text = jwtHelper.verify(token);
To customize the library, you need to use environement variables.
The bold value are mandatary.
The separator used to split the secrets and corresponding key ids.
Example
JWT_SECRET_SEPARATOR='######'
The list of secrets.
Example
JWT_SECRET_TOKEN='oldsecret######ceciestuntest######asupersecret'
The list of the corresponding key ids.
Example
JWT_KEY_IDS='######keyidxyz######fjkal79r879sdf'
The issuer that will provide the token.
Example
JWT_ISSUER='JohnDoeCorp'
The default expire value for the token. If you don't provide it. The token will don't have a default expire value and never expire if you give anything.
Eg: 60, "2 days", "10h", "7d". A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default ("120" is equal to "120ms").
Example
JWT_DEFAULT_EXPIRES=60
Guillaume Quittet
https://www.linkedin.com/in/gquittet/
FAQs
A helper that aims to easily manage multiple secrets for your tokens.
We found that jsonwebtoken-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.