GithubHelp home page GithubHelp logo

Token undefined about fitbit-js HOT 9 OPEN

smwhit avatar smwhit commented on August 9, 2024
Token undefined

from fitbit-js.

Comments (9)

smurthas avatar smurthas commented on August 9, 2024

is there anything returned in the first parameter (the error params)?

from fitbit-js.

felicia0 avatar felicia0 commented on August 9, 2024

Hi, I am receiving the exact same error. Have you been able to solve it?

from fitbit-js.

smurthas avatar smurthas commented on August 9, 2024

When you first started up the test app, did you navigate straight to /getStuff? That would definitely result in that error since there isn't a token yet. There should probably be a redirect to / if token is undefined.

from fitbit-js.

felicia0 avatar felicia0 commented on August 9, 2024

No, when I start up the test app, I navigate to /. However, 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

from fitbit-js.

smurthas avatar smurthas commented on August 9, 2024

After you get redirected back from fitbit.com, where do you end up?

from fitbit-js.

felicia0 avatar felicia0 commented on August 9, 2024

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:
9oetrufr52c1het7d0l1v8693j." However, my app is a browser app in dev.fitbit.com.

Any ideas?

from fitbit-js.

smurthas avatar smurthas commented on August 9, 2024

the callback needs to be /

from fitbit-js.

ryanburgess avatar ryanburgess commented on August 9, 2024

When the callback is set to / I get stuck in a loop on the Fitibit site giving the application access.

from fitbit-js.

smurthas avatar smurthas commented on August 9, 2024

@ryanburgess are you still seeing this issue? (also, see #14)

from fitbit-js.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.