Skip to content
Snippets Groups Projects
Select Git revision
  • fix-issues-with-tabs
  • production default protected
  • erisa/log-retention-windows
  • bib/mailchannels
  • ranbel/tunnel-virtual-networks
  • angela/add-missing-products-to-DLS-table
  • rebecca/lb-ltm-new-content
  • penalosa/ci-cd
  • pedro/PCX-7214-ddos-protection-adv-dns-protection
  • bib/logpush-output-options
  • bib/logpush-r2-api-permissions
  • bib/r2-token-permissions
  • farber/pcx-8473
  • pedro/PCX-5177-custom-lists-with-hostnames-and-asns
  • pedro/PCX-8357-waf-challenge-actions-behavior
  • kate/fixes-npx
  • rebecca/dnssec-configiration-ui
  • move-momento
  • bib/codeowners-browser-rendering
  • max/zt/risk-score
  • fix-filename
21 results

support

  • Clone with SSH
  • Clone with HTTPS
  • AuthenticatedApp

    This is a mountable Rails Engine that provides basic authentication and session management.

    WARNING

    • The password reset mechanism can be used to determine the recovery emails of users, particularly if email only option is set. There should be a rate limit or puzzle. (although, reset by email does not work with the 'email' column of a user, only the recovery_email column)

    TODO

    • Better define requirements
    • Add option to re-enable a user when the user successfully logs in.
    • Add options for flash, etc.

    Requirements

    • haml gem
    • User class
    • Bootstrap 5
    • HAML

    Installation

    Add this line to your application's Gemfile:

    gem 'authenticated_app'

    Configuration

    config/initializers/authenticated_app.rb

    AuthenticatedApp.configure do |config|
      config.home_url = :home_url  # home for authenticated users
      config.root_url = :root_url  # home for unauthenticated users
      config.email_only = false    # if true, use email for login.
      config.default_domain = 'example.org'
    end

    Integration

    class ApplicationController < ActionController::Base
      include AuthenticatedAppConcern
    end

    In routes.rb:

    mount AuthenticatedApp::Engine => "/auth"