3

I am clearly missing something called app here.

I am following Authorization Request section from the documentation. It says your app is callbacked from Salesforce with authorization code in URL parameter with following code app.get('/oauth2/callback', function(req, res) {

I am not sure what I should define as app? Is that some sort of bower/node variable (as most of the guide is centered around it, rather than browser).

My overall goal is to extract refreshToken which fails (undefined) with the current example as according to some documentation it is not using authorization flow (uses implicit flow).

Has anyone faced this problem before?

0

You must be running on the express.js framework (for the specific jsForce example) as outlined in your link:

oAuth2 (Following examples are assuming running on express.js framework.)

The Application Object for express.js is defined here:

http://expressjs.com/api.html#app

  • Thank you, this was the framework also suggested in their Github issues page. I have managed to hack something up (my goal was to validate refresh token destruction policy, my next question on SE) which does somehow trigger infinite loops in JS :) – dzh Sep 12 '15 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.