79786790

Date: 2025-10-09 19:33:22
Score: 1.5
Natty:
Report link

Ok I managed to get working and thanks to this link: https://railsdrop.com/2025/07/15/ruby-on-rails-8-active-admin-the-propshaft-vs-sprockets-dilemma/ And for MFA you need to overwrite session_controler creating app/controllers/admin_users/custom_sessions_controller.rb

module AdminUsers
      class CustomSessionsController < ActiveAdmin::Devise::SessionsController
        include ::ActiveAdmin::Devise::Controller

    def create
      #Add new logic here 
      end
end

and together with this on the routes.rb

custom_config = ActiveAdmin::Devise.config.merge(controllers: { sessions: "admin_users/custom_sessions",
   passwords: "active_admin/devise/passwords",
   unlocks: "active_admin/devise/unlocks",
   registrations: "active_admin/devise/registrations",
   confirmations: "active_admin/devise/confirmations" })
  devise_for :admin_users, custom_config

Good luck

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): this link
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: FredyK