Giter Site home page Giter Site logo

Comments (10)

slobak avatar slobak commented on September 13, 2024

Are you sure the code you're sending is the exact one you're getting back from the authorization? That is the most likely cause of this error. The code generally begins with 0/. Note codes expire after a relatively short time (like 15 minutes).

from node-asana.

thinklinux avatar thinklinux commented on September 13, 2024

I've made some screenshots for you with the code. The time interval is less then a second so I don't think expiration is the problem there.

From the popup

popup

From nodejs

nodejs

from node-asana.

agnoster avatar agnoster commented on September 13, 2024

from node-asana.

agnoster avatar agnoster commented on September 13, 2024

How are you getting the code from your HTTP stack? Normally it should be parsed correctly for you, url decoding is pretty much required to make sense of your query params.

from node-asana.

thinklinux avatar thinklinux commented on September 13, 2024

@agnoster You were absolutely right. I didn't decode my query params. I have no idea how I missed that especially after Greg's response. Thanks a lot guys! Everything is working great now.

from node-asana.

arcl30 avatar arcl30 commented on September 13, 2024

Hi Guys!

Can you please show an example on how to configure a Authorization Code Grant? Would be very glad if you'll help me with this one.

Thanks!

from node-asana.

thinklinux avatar thinklinux commented on September 13, 2024

@arcl30 https://github.com/Asana/node-asana/tree/master/examples/oauth/webserver

from node-asana.

arcl30 avatar arcl30 commented on September 13, 2024

I am using the Pop-up flow and I've seen on the source code comments that all implementing class of BaseFlow can only use implicit grant. My question is, is there an authorization grant for Pop-up type?

Thanks for your help

from node-asana.

slobak avatar slobak commented on September 13, 2024

Popup flows run in the browser, which means non-secure client code. You should not store or use secret keys from your client code (which is accessible to anyone), so that means you cannot use the server-side flows like the authorization grant. The implicit grant exists specifically for browser-side flows like the one you are using—we provide both a Popup and a Redirect version, but they both use the implicit grant under the hood.

from node-asana.

 avatar commented on September 13, 2024

thank you so much for this thread, was looking for a solution for forever

from node-asana.

Related Issues (20)

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.