function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Stephen BusseyStephen Bussey 

OAuth Missing Token

Howdy, I noticed at SF hackathon that Ruby+SF Oauth would sometimes fail with "Oauth_Missing_Token". It would only fail about 50% of the time. Pat and I talked about it and we think it has to do with periods being in the body of POST request in the final bearer token exchange of OAuth. The omniauth-salesforce gem was passing it in POST body instead of Header. I fixed that here: https://github.com/realdoug/omniauth-salesforce/pull/13.

This was not really an issue in my production logs until today, 10/20. With no other oauth changes, we went from 0 errors to 100% failure rate with OAuth connecting. Changing it from POST to Header fixed it. Therefore, I can only think that there is an issue with how POST is processed on the receiving end.
MezzaMezza
Stephen, thanks for the post and fix. Saved my life! 
KevinPKevinP
I'm suspicious that this is actually a issue in the ruby side. Investigating
KevinPKevinP
Stephen,

Do you have a sample org, and oauth key set you can (privately) share with me to help me duplicate this?

I'd like to test a rails app using omniauth-salesforce and a node app using oauth.io with the same keys