Sha256: d88eabf50c544b331f304f57e92da30f4b9285a05f8e67fc83ee8c1d200097df

Contents?: true

Size: 735 Bytes

Versions: 2

Compression:

Stored size: 735 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 the scopes
  # like this:
  #
  # config.scopes = %i[user admin]
  #
  config.scopes = %i[user]

  # 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

2 entries across 2 versions & 1 rubygems

Version Path
simple_auth-3.1.1 lib/simple_auth/templates/install/initializer.rb
simple_auth-3.1.0 lib/simple_auth/templates/install/initializer.rb