app/controllers/sessions_controller.rb
# Attempt to create a session. In other words, attempt to log in.
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Attempt to create a session. In other words, attempt to log in.
Attempt to create a session . In other words attempt to log in .
def create
    counter_fixation 
    if Rails.application.config.deny_login
      flash.now[:danger] = t('sessions.login_disabled')
      render 'new', status: :forbidden
    elsif request.env['omniauth.auth'].present?
      omniauth_login
    elsif params[:session][:provider] == 'local'
      local_login
    else
      flash.now[:danger] = t('sessions.incorrect_login_info')
      render 'new'
    end
  end
def create counter_fixation if Rails . application . config . deny_login flash . now [ :danger ] = t ( 'sessions.login_disabled' ) render 'new' , status : :forbidden elsif request . env [ 'omniauth.auth' ] . present? omniauth_login elsif params [ :session ] [ :provider ] == 'local' local_login else flash . now [ :danger ] = t ( 'sessions.incorrect_login_info' ) render 'new' end end
Attempt to create a session.
Attempt to create a session .
# Counter session fixation (but save forwarding url)