Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
opentok-jwt
Advanced tools
Node module to generate a JWT token given an apiKey and secret. Useful for automated tests against the Opentok API server or other scenarios when you might need to generate these tokens.
npm install --save opentok-jwt
const { accountToken, generateToken, projectToken, verify } = require('opentok-jwt');
const apiKey = <yourAPIKey>;
const apiSecret = <yourAPISecret>;
const projectJWT = projectToken(apiKey, apiSecret);
const accountJWT = accountToken(apiKey, apiSecret);
// or
const projectJWT = generateToken(apiKey, secret, 'project');
const accountJWT = generateToken(apiKey, apiSecret, 'account');
// With custom expiry (Default 30 days)
const expires = Math.floor(new Date() / 1000) + (24 * 60 * 60); // Now + 1 day
const accountJWT = accountToken(apiKey, apiSecret, expires);
const projectJWT = projectToken(apiKey, apiSecret, expires);
// or
const accountJWT = generateToken(apiKey, apiSecret, 'account', expires);
const projectJWT = generateToken(apiKey, apiSecret, 'project', expires);
// Verify
const decoded = await verify(token, secret);
Interested in contributing? We :heart: pull requests! See the Contribution guidelines.
We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:
FAQs
A library for generating OpenTok JWT tokens
We found that opentok-jwt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.