Created
March 26, 2013 04:21
-
-
Save pablomarti/5243118 to your computer and use it in GitHub Desktop.
Use OmniAuth middleware with Facebook inside of an engine. Example: https://github.com/pablomarti/simple_user/blob/master/lib/simple_user/engine.rb
This file contains 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
module SimpleUser | |
require 'rubygems' | |
require 'omniauth' | |
require 'omniauth-facebook' | |
class Engine < ::Rails::Engine | |
isolate_namespace SimpleUser | |
middleware.use OmniAuth::Builder do | |
provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'], :scope => ENV['FACEBOOK_SCOPE'] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment