I use oauth for the greenhouse using omniauth-greenhouse stone. However, after authentication, I call the callback twice, followed by the message
(greenhouse) Setup endpoint detected, running now. (greenhouse) Request phase initiated. Started GET "/auth/greenhouse" for 127.0.0.1 at 2014-08-27 21:41:49 -0700 (greenhouse) Setup endpoint detected, running now. (greenhouse) Callback phase initiated. /Users/ViswaMani/futura-project-enterprise/script/rails: No such file or directory - (greenhouse) Callback phase initiated. (greenhouse) Authentication failure! invalid_credentials: OAuth2::Error, <!DOCTYPE html>
Invalid_acceptions come because of the second call.
I created a new sample application that uses the gem and the same credentials, and I can resolve it to the end. I am not sure if the problem is in my main application.
There is no .rb device, and I only create oauth only once in my omniauth.rb as follows:
Rails.application.config.middleware.use OmniAuth::Builder do provider :greenhouse, 'foo', 'bar', :scope => 'candidates.create candidates.view jobs.view', :provider_ignores_state => true, :setup => lambda { |env| env['omniauth.strategy'].options[:client_options][:site] = 'https://app.greenhouse.io' } end
source share