working ember... again
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
def passthru
|
||||
show_404
|
||||
# Or alternatively,
|
||||
# raise ActionController::RoutingError.new('Not Found')
|
||||
end
|
||||
|
||||
def facebook
|
||||
@user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user)
|
||||
|
||||
if @user.persisted?
|
||||
flash[:notice] = I18n.t "devise.omniauth_callbacks.success", :kind => "Facebook"
|
||||
binding.pry
|
||||
redirect_to user_root_path, :event => :authentication, :current_user => @user
|
||||
else
|
||||
session["devise.facebook_data"] = request.env["omniauth.auth"]
|
||||
redirect_to new_user_registration_url
|
||||
end
|
||||
end
|
||||
|
||||
def failure(env = {})
|
||||
binding.pry
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user