Sha256: b9aece9766f0d44ee80dcace4f7a4169102aa3d4ef40b7bef94617b328f63d3d

Contents?: true

Size: 216 Bytes

Versions: 3

Compression:

Stored size: 216 Bytes

Contents

class SecuredController < ApplicationController

  before_action :logged_in_using_omniauth?

  private

  def logged_in_using_omniauth?
    unless session[:userinfo].present?
      redirect_to '/'
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
omniauth-auth0-1.4.2 examples/ruby-on-rails-webapp/app/controllers/secured_controller.rb
omniauth-auth0-1.4.1 examples/ruby-on-rails-webapp/app/controllers/secured_controller.rb
omniauth-auth0-1.4.0 examples/ruby-on-rails-webapp/app/controllers/secured_controller.rb