Comments (15)
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.
I am just figuring this out. How can I work around this?
Regarding the docs, I think that's what you were referring to:
from grant.
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.
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.
I was thinking about adding something of the sort of:
if (provider.intuit) {
body += '&realmId=' + step2.realmId
}
around here:
Line 92 in 32f024a
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.
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.
Can I submit a pull request for the provider + fix, just without the test?
from grant.
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.
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.
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.
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.
WOW. Thank you so very much!
from grant.
one more question: how should I go about requiring the latest version with grant-express
?
from grant.
Take a look at the Alternative Require section in the documentation.
var Grant = require('grant').express()
from grant.
👋 version 3.5.4 is published on NPM 🎉
from grant.
Related Issues (20)
- Intended method of accessing session.grant HOT 2
- Discord Profile route always 401 Unauthorized HOT 7
- Recommended approach for handling config without checking into git HOT 1
- Support Deno? HOT 3
- iFrame redirect issue with Shopify oAuth HOT 4
- OAuth 2 state - how can I associate a successful grant with a user id HOT 5
- Is there a framework-agnostic API? HOT 1
- Telegram Oauth HOT 2
- Export the grant config and Options HOT 4
- Not working with Next 13 App Router
- How to use dynamic params in custom_params of grant? HOT 1
- Autodesk deprecated v1 (lib's current) oauth endpoints HOT 4
- Incorrect inclusion of client_secret for authorization_code grant in OAuth2 implementation HOT 1
- Switch to OAuth 2 for OpenStreetMap provider HOT 1
- Itch.io authentication HOT 2
- Alternating Domains HOT 5
- Allow to customize "missing provider" error URL? HOT 3
- Any Help to Implement Grant in Next JS
- Is it possible to pass arbitrary data in? HOT 1
- Grant playground open-source? 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 grant.