Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Heroku SSO OmniAuth strategy for Heroku Providers.
Ruby
tag: v1.0.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
Gemfile.lock
Guardfile
README.md
Rakefile
omniauth-heroku-sso.gemspec

README.md

omniauth-heroku-sso

omniauth-heroku-sso provides an OmniAuth strategy for Heroku's single-sign-on, which is part of the Heroku Provider Program.

Usage

Add it to your Gemfile:

gem 'omniauth-heroku-sso`

In a Rails app, add config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :heroku_sso, "HEROKU_SALT"
end

Or, in a Sinatra app:

use OmniAuth::Builder do
  provider :heroku_sso, "HEROKU_SALT"
end

post "/auth/heroku_sso/callback" do
  auth = request.env['omniauth.auth]
  # Use the auth info
end

Version History

1.0.2

  • Added "nav-data" to the "info" portion of the auth hash to allow handing off to Heroku::Nav::Provider.html without going outside the auth hash.

1.0.1

  • Added "name" field to the "info" portion of the auth hash. In Omniauth, this field is required. However, because Heroku only gives us an email address, that value is used here.
  • Added "token" field to the "credentials" portion of the auth hash. You don't need this in regular use, but it's provided for completeness and debugging.

1.0.0

  • Initial release.
Something went wrong with that request. Please try again.