title: Overriding active admin session controller
body: <p>I need to add two factor authentication for active admin.
  Whenever admin tries to login I need to verify them before giving access. Verification can be done either by sending OTP to email or mobile.
  So I need to over ride the Sessions controller for active admin devise so that I can add the functionality to it.
  I found a solution which said that we can do that inside initializers folder.
  I over ride th create method and its working fine.</p>
  
  <p>#config/initializers/active_admin_devise_sessions_controller.rb</p>
  
  <pre><code> class ActiveAdmin::Devise::SessionsController
     include ::ActiveAdmin::Devise::Controller
     def create
  
     if params[:admin_user].present? 
      email = params[:admin_user][:email]
      password = params[:admin_user][:password]
      admin_user = AdminUser.find_by_email(email)
      if admin_user.present? &amp;&amp; admin_user.valid_password?(password)
      @admin_user = admin_user
      redirect_to verification_method_path
      end
     else
       flash[:error] = "No User Found"
       redirect_to :back
     end
  
  
    end
  
    def verification_method
  
    end
  
  end
  </code></pre>
  
  <p>now my problem is I want to add few methods so I can render some views for verification process for login.
  And I am not able to add any custom routes for active admin in session controller so I can call it and use as needed.</p>
  
  <p>my active admin routes</p>
  
  <pre><code>  devise_for :admin_users,ActiveAdmin::Devise.config
    ActiveAdmin.routes(self)
  </code></pre>
  
  <p>my custom GET route to render second form for login verification</p>
  
  <p>#active admin session controller verification routes</p>
  
  <pre><code> get '/admin/verification_method' =&gt; 'active_admin/devise/sessions#verification_method', via: :get, as: "verification_method"
  </code></pre>
  
  <p>I didnt find anything similar to my problem.
  Please guide me how can this be done.</p>