Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

issue #20: returned results to the callback along with access_token a…

…nd refresh_token

Other implementations return more than just access_token and the
refresh_token.  For example, salesforce returns the instance url.
  • Loading branch information...
commit dc0b92cd56acd73ff467ef527b1e2b39429e0f7b 1 parent 99e6259
@gidzone authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/oauth2.js
View
4 lib/oauth2.js
@@ -136,7 +136,9 @@ exports.OAuth2.prototype.getOAuthAccessToken= function(code, params, callback) {
var access_token= results["access_token"];
var refresh_token= results["refresh_token"];
delete results["refresh_token"];
- callback(null, access_token, refresh_token);
+
+ //passing results to the callback as other implementations return additional information
+ callback(null, access_token, refresh_token, results);
}
});
}

2 comments on commit dc0b92c

@ciaranj

looks good, I guess there should be a delete results["access_token"] in there as well now we're actually passing that literal back to the consumer (tbh I'm not sure why the delete results["refresh_token"] is in there, but its always good to be consistent!

If you wouldn't mind adjusting that i'll gratefully/happily pull in both your submitted commits ? :)

Thanks!

@gidzone
Owner
Please sign in to comment.
Something went wrong with that request. Please try again.