-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Token undefined #3
Comments
is there anything returned in the first parameter (the error params)? |
Hi, I am receiving the exact same error. Have you been able to solve it? |
When you first started up the test app, did you navigate straight to |
No, when I start up the test app, I navigate to /. However, the callback: |
After you get redirected back from fitbit.com, where do you end up? |
If I put callback as /getStuff, then I end up at /getStuff with the error "TypeError: Cannot read property 'oauth_token_secret' of undefined." Since I am never getting to the callback of fitbitClient.getAccessToken(... If I leave callback blank I get redirected to a fitbit page with "You have successfully authorized access to [app], Please return to [app] and enter the following PIN when requested: Any ideas? |
the callback needs to be |
When the callback is set to |
@ryanburgess are you still seeing this issue? (also, see #14) |
Hi - does this code still work correctly?
I am getting:
TypeError: Cannot read property 'oauth_token_secret' of undefined
at /Users/simon/code/node/node_modules/fitbit-js/example/test.js:24:39
at callbacks (/Users/simon/code/node/node_modules/express/lib/router/index.js:161:37)
at param (/Users/simon/code/node/node_modules/express/lib/router/index.js:135:11)
at pass (/Users/simon/code/node/node_modules/express/lib/router/index.js:142:5)
at Router._dispatch (/Users/simon/code/node/node_modules/express/lib/router/index.js:170:5)
at Object.router (/Users/simon/code/node/node_modules/express/lib/router/index.js:33:10)
at next (/Users/simon/code/node/node_modules/express/node_modules/connect/lib/proto.js:199:15)
at Object.expressInit as handle
at next (/Users/simon/code/node/node_modules/express/node_modules/connect/lib/proto.js:199:15)
at Object.query as handle
The callback:
fitbitClient.getAccessToken(req, res, function (error, newToken) {
console.log('never get here, but sure we should');
if(newToken) {
token = newToken;
res.writeHead(200, {'Content-Type':'text/html'});
res.end('Now get stuff');
}
});
doesn't seem to get called, which looks like the problem to me.
Any ideas?
The text was updated successfully, but these errors were encountered: