-
Notifications
You must be signed in to change notification settings - Fork 19
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
Missing_OAuth_Token - invalid_credentials #13
Comments
FYI I got around this by changing a post to a get: and in particular, I'm not sure if it's relevant to your issue, but it worked for me. Full disclosure: I didn't track down why changing to a get works. I just observed that it does... so, YMMV! (BTW, this is out of date, the newly maintained version is: https://github.com/realdoug/omniauth-salesforce) |
Cool,will give it a try, thanks for the response. |
Thanks dchaley ,that worked. I am wondering how changing from POST to GET fixed the issue! |
My suspicion is that it's a Faraday version issue, because the code works as-is in the sample (which uses Faraday 0.7.6). More info in my pull request here: realdoug/omniauth-salesforce#12 (<-- that is the currently maintained site for this project, afaict) I think it's that the POST requires the oauth_token to be part of a multipart form body, whereas the GET puts it as a parameter; I am guessing that the older version of Faraday did the right thing but the newer one is being stricter or an interface changed, or something like that. What version of Faraday are you using @msreekm ? |
faraday (0.8.9) and it was working fine with version 0.8.8. |
Hi. I am experiencing same issue. Tried to run your application "in action" getting Thanks. |
Follow up that this is fixed with the latest version at realdoug. |
Hi sb8244- just curious, was this fixed recently @realdoug and do you know what was causing it to fail? |
@msreekm yea, I fixed it. The issue (I think) is that the old way was to POST the access_token in the body of the request. This may have worked in the past, but I think that SFDC changed their encoding so that spaces in the post body trip it up. I came to this conclusion while talking to Pat Patterson at Dreamforce and he said that is a likely cause (although blamed the library and not SFDC). In any case, the proper way of sending an access_token is always in the header and never in the url or POST body. |
I had the same issue and changing the post to get fixed the issue for me. |
@kenleezle pull in the latest omniauth-salesforce and it's fixed through the header method. |
Correct. Also, the source code for the gem is located here: https://github.com/realdoug/omniauth-salesforce so any issues, please open them under that repo. |
ERROR -- omniauth: (salesforce) Authentication failure! invalid_credentials: OAuth2::Error, Missing_OAuth_Token
we started getting this error recently, any suggestions. It is an intermittent issue.
The text was updated successfully, but these errors were encountered: