Git Product home page Git Product logo

Comments (15)

simov avatar simov commented on April 29, 2024

The querystring parameters you are seeing are from step2 of the OAuth flow, the final response is after step3. In other words Grant returns to you what the service responds with in the final step3 of the OAuth flow.

Can you point me to the Intuit docs on where are these parameters passed, and how are they supposed to be used?

from grant.

noyfactor avatar noyfactor commented on April 29, 2024

I am just figuring this out. How can I work around this?

Regarding the docs, I think that's what you were referring to:

https://developer.intuit.com/docs/0100_accounting/0060_authentication_and_authorization/connect_from_within_your_app#/2._Get_the_OAuth_access_token-7833

from grant.

simov avatar simov commented on April 29, 2024

Got it, that's totally out of the OAuth specification, but I think I can patch my code easily. I'll let you know when it's done. Do you need the dataSource parameter as well? I don't see anything about it in their docs and its value seems to be QBO for me as well.

from grant.

noyfactor avatar noyfactor commented on April 29, 2024

I don't think that the dataSource is necessary for now (at least not for me :) ). I'd be happy if you could point me in the right direction so I can patch it myself for the time being since this is becoming a little urgent on my end.

from grant.

noyfactor avatar noyfactor commented on April 29, 2024

I was thinking about adding something of the sort of:

if (provider.intuit) {
          body += '&realmId=' + step2.realmId
      }

around here:

done(null, utils.toQuerystring(provider, body))

Otherwise, I think the entire step2 data should be sent to utils.toQuerystring and that seems like an overkill.. What do you think?

from grant.

simov avatar simov commented on April 29, 2024

Yep that's the spot, I'm about to add it right now, but I'm going to write a test for it, so you might be faster than me.

Sending the entire data is not necessary, it's easier that way, but I want to be explicit in that part of the app.

from grant.

noyfactor avatar noyfactor commented on April 29, 2024

Can I submit a pull request for the provider + fix, just without the test?

from grant.

simov avatar simov commented on April 29, 2024

Well, I just pushed some stuff already, so probably won't be needed, though you helped me a lot already. I just can't find anything about the custom parameters and how are they used, so if you can point me to the right place in their docs that would be great. Their docs are definitely not very helpful for library authors.

from grant.

noyfactor avatar noyfactor commented on April 29, 2024

if it's already pushed, I'd love to use your branch instead of my forked one (for future updates), so I'd be more than happy to know once it's pushed.
In regards to documentation, I just used the examples they're providing in https://developer.intuit.com/docs/0100_accounting/0060_authentication_and_authorization/connect_from_within_your_app#/Sample_Implementations and went through to code to make some sense out of it...

from grant.

simov avatar simov commented on April 29, 2024

Done!

npm install https://github.com/simov/grant.git --save

I'm usually releasing the new version by the end of the month.

from grant.

simov avatar simov commented on April 29, 2024

Btw, you can now use this configuration:

var connectConfig = {
    "server": {
        "protocol": "http",
        "host": "localhost:3000",
        "transport": "session",
    },
    "intuit": {
        "key": "MY_KEY",
        "secret": "MY_SECRET",
        "callback": "/oauth/connect/intuit"
    }
}

I'll let you know when the new version is out.

As for the custom parameters they are probably these:

<script src="https://js.appcenter.intuit.com/Content/IA/intuit.ipp.anywhere-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
    intuit.ipp.anywhere.setup({
            grantUrl: 'http://www.mycompany.com/HelloWorld/RequestTokenServlet',
            datasources: {
                 quickbooks : true,
                 payments : true
           },
            paymentOptions:{
                  intuitReferred : true
           }
    });
</script>

But I'm not sure, and I don't think I'm going to dig through their library to find out.

from grant.

noyfactor avatar noyfactor commented on April 29, 2024

WOW. Thank you so very much!

from grant.

noyfactor avatar noyfactor commented on April 29, 2024

one more question: how should I go about requiring the latest version with grant-express?

from grant.

simov avatar simov commented on April 29, 2024

Take a look at the Alternative Require section in the documentation.

var Grant = require('grant').express()

from grant.

simov avatar simov commented on April 29, 2024

👋 version 3.5.4 is published on NPM 🎉

from grant.

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.