
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
salesforce-jwt-promise
Advanced tools
Promise Based SalesForce Auth 2.0 JWT Bearer Token Flow Implementation, written in typescript
Promise Based implementation of OAuth 2.0 JWT Bearer Token Flow.
async/await
syntax.$ npm install salesforce-jwt-promise
This library contains an single export: getJWTToken()
which accepts an object with the following options object parameter:
clientId
: The salesforce connected app consumerKeyprivateKey
: The private key used to sign the certificated uploaded to the connected appuserName
: The user to impersonateaudience
: (Optional) Defaults to https://login.salesforce.cominstance_url
: (Optional) Defaults to audience
A success response will include the following properties:
import { getJWTToken } from 'salesforce-jwt-promise';
var clientId = '3MVG9A2kN3Bn17hvVNDOE5FX8c9hS...30dgSSfyGi1FS09Zg';
var privateKey = require('fs').readFileSync('./privateKey.key', 'utf8'); // this should probably be encrypted!
try{
let jwtResp = await getJWTToken(
{
clientId: clientId,
privateKey: privateKey,
userName: 'user@toImpersonate.com',
audience: 'https://test.salesforce.com'
}
);
//use token
var sfConnection = new jsforce.Connection();
sfConnection.initialize({
instanceUrl: jwtResp.instance_url,
accessToken: jwtResp.access_token
});
}catch(e){
console.log(e);
}
MIT
Forked from leandrob/node-salesforce-jwt
FAQs
Promise Based SalesForce Auth 2.0 JWT Bearer Token Flow Implementation, written in typescript
The npm package salesforce-jwt-promise receives a total of 222 weekly downloads. As such, salesforce-jwt-promise popularity was classified as not popular.
We found that salesforce-jwt-promise 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.