app/controllers/auth_controller.rb
def google_login
    g_email = env['omniauth.auth'].info.email
    Rails.logger.debug("email : #{g_email}")
    user = User.find_by_email(g_email)
    if user.nil?
      flash[:error] = "This email is not authorized to use Expertiza!"
      redirect_to root_path
    else
      after_login(user)
    end
  end
# Login functionality for google login feature using omniAuth2
Login functionality for google login feature using omniAuth2
Login functionality for google login feature using omniAuth2
def google_login
    g_email = env['omniauth.auth'].info.email
    Rails.logger.debug("email : #{g_email}")
    user = User.find_by_email(g_email)
    if user.nil?
      flash[:error] = "This email is not authorized to use Expertiza!"
      redirect_to root_path
    else
      after_login(user)
    end
  end
def google_login g_email = env [ 'omniauth.auth' ] . info . email Rails . logger . debug ( "email : #{g_email}" ) user = User . find_by_email ( g_email ) if user . nil? flash [ :error ] = "This email is not authorized to use Expertiza!" redirect_to root_path else after_login ( user ) end end
Login functionality for google login feature using omniAuth2
Login functionality for google login feature using omniAuth2