salesforce-oauth2 -- Salesforce OAuth2 Web Server Authentication Flow
Abstract
A very lightweight implementation of the OAuth2 Web Server Authentication Flow for Salesforce for Node.js.
As Salesforce already provides a very robust REST API, the aim of this module is to provide a very thin wrapper for the authentication functionality only.
Install
npm install salesforce-oauth2
Usage
An example using the express web framework:
var express = oauth2 = ; var callbackUrl = "<your callback url>" consumerKey = "<your consumer key>" consumerSecret = "<your consumer secret>"; var app = express; app; app; app;
Getting refresh_token
To get refresh_token you must pass 'refresh_token' word on scope. Remember to add a Available OAuth Scopes - refresh_token to Selected OAuth Scopes in your console developer Example:
app;