working ember... again

This commit is contained in:
2013-10-07 23:00:01 +02:00
parent a8c01d264e
commit 2f41560591
46 changed files with 274 additions and 114 deletions
@@ -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