Sha256: afa6e0ef26bbacd29bea953eb18ab35891e52e7aa3ae45b2e4e6c857aac41e80

Contents?: true

Size: 743 Bytes

Versions: 5

Compression:

Stored size: 743 Bytes

Contents

# frozen_string_literal: true

SimpleAuth.setup do |config|
  # Define with scopes will be installed.
  # This can be useful if you want to have separated sessions
  # (e.g. regular user and admin user).
  #
  # To enable both user and admin sessions, you can define this options
  # like this:
  #
  # config.scopes = %i[user admin]
  #
  config.scopes = %i[user admin]

  # Set the login url.
  # This is where users will be redirected to when they're unlogged.
  config.login_url = proc { login_path }

  # Logged users will be redirect to this url
  # when `before_action :redirect_logged_user` filter is used.
  config.logged_url = proc { dashboard_path }

  # Install SimpleAuth helpers to the controllers.
  config.install_helpers!
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple_auth-3.1.4 test/support/dummy/config/initializers/simple_auth.rb
simple_auth-3.1.3 test/support/dummy/config/initializers/simple_auth.rb
simple_auth-3.1.2 test/support/dummy/config/initializers/simple_auth.rb
simple_auth-3.1.1 test/support/dummy/config/initializers/simple_auth.rb
simple_auth-3.1.0 test/support/dummy/config/initializers/simple_auth.rb