As the other answers have said, if you want to use omniauth with facebook, then simply follow Mikhail's answer, (you get the consumer key and secret by registering with facebook). If you follow that pattern, you will actually be authenticating with facebook via OAuth2 and not via OpenID.
If you want to use omniauth with an OpenID provider like google for example, the pattern is slightly different e.g.:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :openid, ActiveRecordOpenidStore::ActiveRecordStore.new, :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
end
OpenID requires a "store" to store associations and nonces that get created during the authentication process (in the above case we're using an ActiveRecord based OpenID store). With the above configuration going to the following url:
${RAILS_ROOT}/auth/google
Should kick off the OpenID authentication process against google. If you want to use a different OpenID provider to authenticate against, you will need to alter the :name
and :identifier
fields appropriately.