No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
omniauth-greenhouse.gemspec

README.md

Greenhouse

Integrate with Greenhouse via OAuth 2.0

Installation

Add this line to your application's Gemfile:

gem 'omniauth-greenhouse'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omniauth-greenhouse

Usage

It's easy to integrate with Greenhouse using the OmniAuth gem.

If you aren't currently a Greenhouse customer, the first step is to reach out to our Partnerships team at partners@greenhouse.io to request a CLIENT_KEY and CLIENT_SECRET.

Unfortunately, there is no self-service mechanism to register your application. When you send a request to register your application, you will need to provide:

Once you receive your CLIENT_KEY and CLIENT_SECRET, add this to your config/initializers/omniauth.rb file:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :greenhouse, '<CLIENT_KEY>', '<CLIENT_SECRET>',
           :scope => 'candidates.create candidates.view'
end

After this is configured, your users will be able to authorize your application to use their Greenhouse account via:

http://myapp.example.com/auth/greenhouse

The user will be presented with an authorization screen. When the user clicks on the 'Authorize' button, they will be redirected back to your site to the 'Callback URL' you provided during the application registration process. This callback URL will look something like:

http://myapp.example.com/auth/greenhouse/callback

If the user clicked on the 'Authorize' button, you can retrieve the OAuth 2.0 token via:

request.env['omniauth.auth']['credentials']['token']

If the user clicked on the 'Deny' button, a 'oauth_problem' query parameter will be set with a value of 'user_refused'.