-
Notifications
You must be signed in to change notification settings - Fork 10
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
Error with getAccessToken() #46
Comments
Also, just a question. If I've given the Traveler object my clientID - should I need to parse my clientID again when using generateOAuthURL? Doesn't seem to work without parsing my clientID. Was just following the documentation and it didn't show parsing the clientID 🙂
Not sure if it's possible for it to read what you've already given to the object, that'd be really convenient, or whether the documentation just needs a quick update. Thanks again 🙂👍 |
@Jakosaur Thanks for your issue. Indeed there seems to be an issue with the OAuth methods. Additionally I should update the documentations to clear things up:
Unfortunately I do not have time to fix the issue this weekend.. I hope I can get to work on it until next Sunday, hope that does not causes some problems on your side. But you are also free to open a PR if you already found a fix for it :) |
If it's possible to use the clientID set on the Traveler object, it'd be more convenient - in my opinion. Further up the documentation for OAuth, the example tells you to give your clientID so would make more sense to not have to give it again 🙂 |
I also didn't have a change to look at it, really sorry for that - I assume it has something to do with the imports of |
I threw a Now I'm out of my depth so I hope this can be fixed soon, would love to use this package. :) |
(Apologies for the triple comment!) I got it working locally by ditching FormData altogether and just manually building an object with client_id, code, and grant_type in it in OAuthResource.js. Presumably there's a benefit to FormData I'm missing, but at least I can move forward with OAuth while this gets looked at. 😃 |
Just remembered about this issue, haven't had a chance to try and fix it and push a PR. I'll try the solution above 🙂 |
@roxaloxa I can't seem to get this working for some reason. Able to send a screenshot of the changes you made? 🙂 |
My app is kinda broken right now 😅 but here's the relevant code from
You can kinda see my thought process with what's commented out. Basically ditching the FormData stuff. Back when I made the comment, the object worked fine and something changed since so now I do the manually built string of params. It's not pretty, but it let me move on for the time being. |
@roxaloxa Thanks for that! Working perfectly for me 😊 |
Bug Report
Your Environment
Expected Behavior
Current Behavior
Code Sample
Using the sample given in the documentation
traveler.oauth.getAccessToken(hereComesTheCode).then(oauth => { // Provide your traveler object with the oauth object. This is later used for making authenticated calls traveler.oauth = oauth; }).catch(err => { console.log(err) })
Just changed hereComesTheCode to my own variable which has the code stored.
The text was updated successfully, but these errors were encountered: