title: Combining 2 params to create the password when using Devise
body: <p>I'm using Rails 4 with Devise and I've got a situation where I need to log someone in where the password is made up of 2 separate input fields. After submitting, I need to combine the 2 inputs to form the password before the params get used to authenticate them. </p>
  
  <p>I know the login details are correct because if I have a single password field it all works as expected. </p>
  
  <p>As a test I've tried to submit a blank password and then intercept the params in the sessions controller by temporarily hard coding the correct password - e.g.   </p>
  
  <pre><code>class SessionsController &lt; Devise::SessionsController
    def create
      params[:user][:password] = "ABCDE-12345"
  
      [... the rest of the standard devise sessions controller ... ]
    end
  end 
  </code></pre>
  
  <p>But that simply doesn't work. Something is happening before hitting this controller and any pointers on how I can intercept the submitted parameters would be appreciated. Code for the Devise controller is here: </p>
  
  <p><a href="https://github.com/plataformatec/devise/blob/master/app/controllers/devise/sessions_controller.rb" rel="nofollow">https://github.com/plataformatec/devise/blob/master/app/controllers/devise/sessions_controller.rb</a></p>
  
  <p>Do I need to write a custom Warden strategy perhaps?</p>