Class: Pageflow::Users::OmniauthCallbacksController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Pageflow::Users::OmniauthCallbacksController
- Defined in:
- app/controllers/pageflow/users/omniauth_callbacks_controller.rb
Overview
oAuth callbacks are handled by this controller
Instance Method Summary collapse
Instance Method Details
#auth_callback ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/pageflow/users/omniauth_callbacks_controller.rb', line 9 def auth_callback result = AuthenticationToken.find_auth_token(current_user, auth_provider) if result.empty? create_auth_token current_user else update_auth_token result.first end render_or_redirect end |
#failure ⇒ Object
19 20 21 |
# File 'app/controllers/pageflow/users/omniauth_callbacks_controller.rb', line 19 def failure redirect_to root_path end |