Created
February 25, 2015 16:48
-
-
Save joshbirk/7cdbab355fc63570c672 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sfStrategy = new ForceDotComStrategy({ | |
clientID: CF_CLIENT_ID, | |
clientSecret: CF_CLIENT_SECRET, | |
callbackURL: CF_CALLBACK_URL, | |
authorizationURL: SF_AUTHORIZE_URL, | |
tokenURL: SF_TOKEN_URL | |
//the current sample lists the first param as "Token", but it's really an OAuth object Look at the params field on it. | |
}, function(oauth, refreshToken, profile, done) { | |
// asynchronous verification, for effect... | |
process.nextTick(function() { | |
//so if we want to store the oauth info, now is our chance. | |
//instance_url added here since you need that to properly form Force.com API endpoints | |
profile.options = { | |
Authorization: oauth.params.access_token, | |
token_secret: refreshToken, | |
instance_url: oauth.params.instance_url | |
}; | |
delete profile._raw; | |
return done(null, profile); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment