OmniAuth strategy for salesforce.com
Ruby
Switch branches/tags
Clone or download
realdoug Merge pull request #24 from kimyu92/update_gem
update omniauth-oauth2, add rubocop and minor cleanup
Latest commit 2e31a49 Feb 19, 2018
Permalink
Failed to load latest commit information.
lib update omniauth2, add rubocop and minor cleanup Feb 19, 2018
spec update omniauth2, add rubocop and minor cleanup Feb 19, 2018
.gitignore
.rspec initial creation Nov 8, 2011
.rvmrc Add a .rvmrc file to isolate the gem's dependencies during development. Mar 7, 2012
Gemfile update omniauth2, add rubocop and minor cleanup Feb 19, 2018
Guardfile initial creation Nov 8, 2011
LICENSE.md rm typo in license May 17, 2013
README.md Update README.md May 7, 2013
Rakefile initial creation Nov 8, 2011
omniauth-salesforce.gemspec

README.md

omniauth-salesforce

OmniAuth Strategy for salesforce.com.

Note: This is a fork of the original project and is now the main repository for the omniauth-salesforce gem.

See it in action

http://omniauth-salesforce-example.herokuapp.com

Source for above app

Basic Usage

require "sinatra"
require "omniauth"
require "omniauth-salesforce"

class MyApplication < Sinatra::Base
  use Rack::Session
  use OmniAuth::Builder do
    provider :salesforce, ENV['SALESFORCE_KEY'], ENV['SALESFORCE_SECRET']
  end
end

Including other sites

use OmniAuth::Builder do
    provider :salesforce, 
             ENV['SALESFORCE_KEY'], 
             ENV['SALESFORCE_SECRET']
    provider OmniAuth::Strategies::SalesforceSandbox, 
             ENV['SALESFORCE_SANDBOX_KEY'], 
             ENV['SALESFORCE_SANDBOX_SECRET']
    provider OmniAuth::Strategies::SalesforcePreRelease, 
             ENV['SALESFORCE_PRERELEASE_KEY'], 
             ENV['SALESFORCE_PRERELEASE_SECRET']
    provider OmniAuth::Strategies::DatabaseDotCom, 
             ENV['DATABASE_DOT_COM_KEY'], 
             ENV['DATABASE_DOT_COM_SECRET']
end

Resources