Class: GithubAuthenticationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- GithubAuthenticationController
- Defined in:
- app/controllers/github_authentication_controller.rb
Instance Method Summary collapse
Instance Method Details
#callback ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/github_authentication_controller.rb', line 4 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
14 15 16 17 |
# File 'app/controllers/github_authentication_controller.rb', line 14 def logout reset_session redirect_to root_path end |