-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Refresh token failing #452
Comments
Maybe you already tried this, but I wonder if it's related to this change? We explicitly set the redirect URI for the I see in the error message it says (emphasis mine):
|
Ah actually, that commit was July 22nd, but you opened this originally on June 30th, so maybe they are unrelated. Still... might want to check the redirect URI in Field Kit to make sure that's set up properly, otherwise it might lead to another issue anyway. |
Hmm, I saw that message too and did wonder about the redirection URI. Although I don't think we send that URI from FK, with the password authorization flow we use. I'll have to look into this further next week. Right now I'm wrapping up #454, which is a huge chunk towards finishing the alpha release! It will also allow me to commit my first (mostly) working version of FK in a while, so we can actually try to reproduce this on other machines, which seems key. 🤞 |
Cross-linking this issue with farmOS/farmOS.js#35, since that issue is also concerned with OAuth, and will also require some of @paul121's counsel. |
So one potential issue here could be if we're trying to perform the So I pulled the latest farmOS-client 2.0.0-alpha.1 into my local and took a peek at all this in my debugger. What's interesting is that the server is not seeing any of the body payload for the The The initial But the Does it seem like this could be the issue? Have to run, but I think the next step would be to try manually crafting the |
Oh this sounds very plausible! The request to refresh the token is already setting the const refreshParams = new URLSearchParams();
refreshParams.append('grant_type', 'refresh_token');
refreshParams.append('client_id', clientId);
refreshParams.append('refresh_token', token);
axios.post(accessTokenUri, refreshParams); No headers required! Just need to test it out and make sure it works. |
Just pushed a WIP commit with these changes, but still haven't tested: jgaehring/farmOS.js@5ef1f2e. |
Resolved by jgaehring/farmOS.js@f63d062. |
When the OAuth
access_token
expires and Field Kit (via farmOS.js) tries to refresh the token, it fails (full error response further below).I think this is probably a server issue, but I wanted to put some notes here for future reference and as a reminder to follow-up when we're closer to a beta for FK 2.x. @paul121 and I did a little troubleshooting today but couldn't zero in on the issue, in part because he couldn't reproduce the same error on his machine to debug. I've got a lot of unstaged changes still locally so we probably need to wait til those are committed before pursuing again.
Next Steps
develop
branchfarm_client
settings are the sameJSON Dump
Copy and pasting some JSON from requests/responses to and from
/oauth/token
:The text was updated successfully, but these errors were encountered: