Class: Shipit::GithubAuthenticationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Shipit::GithubAuthenticationController
- Defined in:
- app/controllers/shipit/github_authentication_controller.rb
Instance Method Summary collapse
Instance Method Details
#callback ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/shipit/github_authentication_controller.rb', line 6 def callback return_url = request.env['omniauth.origin'] || root_path auth = request.env['omniauth.auth'] return render('failed', layout: false) if auth.blank? session[:user_id] = sign_in_github(auth) redirect_to(return_url) end |
#logout ⇒ Object
17 18 19 20 |
# File 'app/controllers/shipit/github_authentication_controller.rb', line 17 def logout reset_session redirect_to(root_path) end |