Class: Pageflow::Users::OmniauthCallbacksController

Inherits:
ApplicationController show all
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_callbackObject



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

#failureObject



19
20
21
# File 'app/controllers/pageflow/users/omniauth_callbacks_controller.rb', line 19

def failure
  redirect_to root_path
end