Class: Sso::Auth::OmniauthCallbacksController

Inherits:
Devise::OmniauthCallbacksController
  • Object
show all
Defined in:
app/controllers/sso/auth/omniauth_callbacks_controller.rb

Instance Method Summary collapse

Instance Method Details

#identityObject



4
5
6
7
8
# File 'app/controllers/sso/auth/omniauth_callbacks_controller.rb', line 4

def identity
   User.find_or_create_by_omniauth_hash(request.env['omniauth.auth']), :event => :authentication
  flash[:notice] = I18n.t('devise.omniauth_callbacks.success', :kind => I18n.t('sso-auth.provider.title'))
  redirect_to stored_location_for(:user) || main_app.root_path
end