Skip to content

bfagundez/salesforce-jwt-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

salesforce-jwt-auth

Salesforce JWT auth written in modern js.

Usage:

const salesforceJWT = require('salesforce-jwt-auth')
const jsforce = require('jsforce')

// load your key
const privateKey = require('fs').readFileSync('./certificates/server.key', 'utf8')

const accessToken = await salesforceJWT.getToken(<clientId>, privateKey, <username>)
const connOptions = {
  instanceUrl : <instance url>,
  accessToken : accessToken
}

// use JSforce
const conn = await new jsforce.Connection(connOptions)

About

Salesforce JWT auth written with modern js.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published