Module: FacebookAuthFunctions
- Defined in:
- app/controllers/facebook_auth_functions.rb
Constant Summary collapse
- SESSION_KEY =
:fbauth
- OLD_FB_SESSION_PARAMS_KEY =
:session
- FB_SIGNED_REQUEST_KEY =
:signed_request
Instance Method Summary collapse
Instance Method Details
#require_facebook_auth ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/facebook_auth_functions.rb', line 11 def require_facebook_auth setup_facebook_auth if @facebook_auth.nil? redirect_to build_auth_url elsif signed_params_present? && request.post? # If Facebook POST with signed_params, redirect to original URI using GET redirect_to request.request_uri end end |
#setup_facebook_auth(auth = nil) ⇒ Object
7 8 9 |
# File 'app/controllers/facebook_auth_functions.rb', line 7 def setup_facebook_auth auth=nil @facebook_auth = auth ||= facebook_auth end |