Package Exports
- passport-salesforce
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (passport-salesforce) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
passport-salesforce
Salesforce authentication strategy for Passport.
Install
$ npm install passport-salesforce
Usage
Configure Strategy
passport.use(new SalesforceStrategy({
clientID: CLIENT_ID,
clientSecret: CLIENT_SECRET,
callbackURL: "http://localhost:1234/salesforce/callback"
},
function(accessToken, refreshToken, profile, done) {
done(null, {});
}
));
Authenticate Requests
Use passport.authenticate()
, specifying the 'salesforce'
strategy, to
authenticate requests.
For example, as route middleware in an Express application:
app.get('/force/authorize',
passport.authenticate('salesforce', {session: false}));
app.get('/force/callback',
passport.authenticate('salesforce', {session: false}),
function(req, res) {
res.redirect('/');
});
Tests
Credits
License
Copyright (c) 2011-2015 Jared Hanson <http://jaredhanson.net/>