Closed lucassouza1 closed 13 years ago
I've added callbackUrl to the options as per your suggestion. Its currently on https://github.com/bytespider/jsOAuth/tree/callback_url_issue12 branch. I'll bring this into master and generate a new version at the end of the week
Thanks!
V1.1 in the downloads section now.
Hello again @bytespider
I'm having problems with callbackurl.
Define my OAuth object as follows:
OAuth({
consumerKey: servXML.attr("appKey"),
consumerSecret: servXML.attr("appSecret"),
requestTokenUrl: servXML.attr("request_token"),
authorizationUrl: servXML.attr("authorize"),
accessTokenUrl: servXML.attr("access_token"),
callbackUrl: "http://ridermansb.kodingen.com"
});
Authentication
oauthObj.fetchRequestToken(openAuthoriseWindow, failureHandler);
Callback success function for fetchRequestToken
openAuthoriseWindow = function(url) {
window.open(url, "authorise", "width=850,height=550,toolbar=no,resizable=yes,scrollbars=yes");
}
I'm trying to consume the Dropbox API. After the authentication URL is returned:
_https://www.dropbox.com/1/oauth/authorize?oauth_token_secret={XXX}&oauth_token={XXX}_
Before allow
After allow
Apparently that was not called calbackurl
Am I doing something wrong? What do you suggest?
Note: Using the Twitter API, everything works perfectly!
Only oob is available. create an option to callback url and use it on headerParams
headerParams = { 'oauth_callback': oauth.callbackUrl, // 'oob' - Make it flexible 'oauth_consumer_key': oauth.consumerKey, 'oauth_token': oauth.accessTokenKey, 'oauth_signature_method': oauth.signatureMethod, 'oauth_timestamp': getTimestamp(), 'oauth_nonce': getNonce(), 'oauth_verifier': oauth.verifier, 'oauth_version': OAUTH_VERSION_1_0 };