Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Same origin policy issue using Fitbit OAuth authentication

I am working on .Net application and trying to access services from Fitbit, but got stuck with the Authentication process. I am using OAuth 1 and facing "Same origin policy" issue,

XMLHttpRequest cannot load https://www.fitbit.com/oauth/authorize?oauth_token=****************. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

I have seen several nice posts on using CORS or JSONP but Fitbit doesn't support both, I am looking for a clean work around for it (not disabling browser restriction). It would be helpful if you can post your suggestions, if you have faced this before.

Best Answer
0 Votes
1 REPLY 1

You cannot do a XMLHttpRequest of OAuth 1.0a. You must redirect the user to the authorization page or open the URL in a new window.

Best Answer
0 Votes