tap/app/controllers/callbacks_controller.rb

12 lines
292 B
Ruby
Raw Normal View History

2015-03-19 22:37:16 +01:00
class CallbacksController < Devise::OmniauthCallbacksController
def zeuswpi
@user = User.from_omniauth(request.env["omniauth.auth"])
2015-03-20 02:21:56 +01:00
flash[:success] = "Logged in successfuly"
2015-03-19 22:37:16 +01:00
sign_in_and_redirect @user
end
2015-03-20 02:21:56 +01:00
def after_omniauth_failure_path_for(scope)
root_path
end
2015-03-19 22:37:16 +01:00
end