Comments (5)
I've been looking into this the past few days and I think I found out a possible reason; check out this post on the Fitbit dev forums which explains a change they made where new credentials are created for a user upon every oauth login flow- if you are storing and reusing the tokens returned by Fitbit but allowing (or forcing) the user to relogin through the OAuth flow then the tokens you have stored may be out of sync with the latest returned by the service.
I'm in the process of testing out this theory on the client application (which is currently broken) and I'll update this issue with more info when I have it.
from fitgem.
Hey Zachery,
Thanks so much for the response and please do keep me posted if you would!
:)
I tried to access the API without re-authorizing but I'm still having the
same issue. I'm wondering if what I'm seeing is related or not?
I noticed when using the API explorer on the FB website, they include stuff
like oauth_signature_method, oauth_timestamp, oauth_nounce, and
oauth_signature. I'm not sure if the oauth gem that your gem uses wraps
this into the call or not?
TIA,
Peter
SUDO Labs | Zuluworks.com | ThreePoint.io | CheckRide.io
"It's a Jungle Up There": www.zuluworks.com http://www.zuluworks.com
Cell: 804.690.5896
On Wed, May 7, 2014 at 1:23 PM, Zachery Moneypenny <[email protected]
wrote:
I've been looking into this the past few days and I think I found out a
possible reason; check out this post on the Fitbit dev forumshttps://groups.google.com/forum/?hl=en&lnk=gcimh#!topic/fitbit-api/Win6-rrD7rcwhich explains a change they made where new credentials are created for a
user upon every oauth login flow- if you are storing and reusing the tokens
returned by Fitbit but allowing (or forcing) the user to relogin through
the OAuth flow then the tokens you have stored may be out of sync with the
latest returned by the service.I'm in the process of testing out this theory on the client application
(which is currently broken) and I'll update this issue with more info when
I have it.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-42456548
.
from fitgem.
I figured out the fix for what I was seeing with the same error in the fitgem-client project (see this issue/commit for more info).
You may want top sniff the request/response to the api.fitbit.com endpoint and compare the oauth user tokens returned by the login redirect to what you're sending with the API request to make sure they match.
from fitgem.
To answer your other question; the oauth library takes care of generating the oauth_signature/nonce, etc.
from fitgem.
Zachery,
Thanks for the follow up. Not sure what was going on for me but I ended up
putting together the raw pieces (Oauth consumer, token, etc.) and invoking
the lower level pieces directly and got it working.
-Peter
SUDO Labs | Zuluworks.com | ThreePoint.io | CheckRide.io
"It's a Jungle Up There": www.zuluworks.com http://www.zuluworks.com
Cell: 804.690.5896
On Thu, May 8, 2014 at 3:57 PM, Zachery Moneypenny <[email protected]
wrote:
To answer your other question; the oauth library takes care of generating
the oauth_signature/nonce, etc.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-42598445
.
from fitgem.
Related Issues (20)
- feature request: add last sync time HOT 2
- fitgem.gemspec is missing version.rb HOT 3
- reconnect method results in "Invalid/expired user token" HOT 5
- Date range support? HOT 2
- Doco fix HOT 2
- DateTime format for data_by_time_range HOT 2
- Add support for Intraday Time Series API
- Access to HTTP response codes HOT 4
- Fitgem::Client#authorize failing with OAuth::Unauthorized error HOT 1
- intraday_time_series for minutesVeryActive? HOT 1
- Use https always HOT 2
- Prepare for deprecation of API methods
- Authorize URL should not be under api.fitbit.com HOT 4
- Bad file in list of requirements HOT 2
- Oauth2 Support HOT 2
- Fitbit API has changed
- Time series on body measurements
- Upgrade for OAuth 2.0 HOT 2
- RE: Is there still a maintainer on this gem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fitgem.