-
-
Save rishav/700461 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'openid/store/filesystem' | |
ActionController::Dispatcher.middleware.use OmniAuth::Builder do | |
provider :twitter, 'key', 'secret' | |
provider :facebook, 'app_id', 'secret' | |
provider :linked_in, 'key', 'secret' | |
provider :open_id, OpenID::Store::Filesystem.new('/tmp') | |
end | |
# you will be able to access the above providers by the following url | |
# /auth/providername for example /auth/twitter /auth/facebook | |
ActionController::Dispatcher.middleware do | |
use OmniAuth::Strategies::OpenID, OpenID::Store::Filesystem.new('/tmp'), :name => "google", :identifier => "https://www.google.com/accounts/o8/id" | |
use OmniAuth::Strategies::OpenID, OpenID::Store::Filesystem.new('/tmp'), :name => "yahoo", :identifier => "https://me.yahoo.com" | |
use OmniAuth::Strategies::OpenID, OpenID::Store::Filesystem.new('/tmp'), :name => "aol", :identifier => "https://openid.aol.com" | |
use OmniAuth::Strategies::OpenID, OpenID::Store::Filesystem.new('/tmp'), :name => "myspace", :identifier => "http://myspace.com" | |
end | |
# you won't be able to access the openid urls like /auth/google | |
# you will be able to access them through | |
# /auth/open_id?openid_url=https://www.google.com/accounts/o8/id | |
# /auth/open_id?openid_url=https://me.yahoo.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment