Rails app returning 401 Unauthorized while logging in only in production
<p>I can't login in my app that is deployed on Heroku, so that one is in <code>production</code>. On my local machine the one that runs the <code>development</code> it does work without a problem. Both the databases are exactly the same as they are dump copies of each other. </p>

<p>I verified the user does exist in the remote database and the password is given in correctly, both local and remote version are from the same branch and are synced.</p>

<p>I've tried <a href="https://stackoverflow.com/a/24885909/3845362">this</a> solution, but my <code>config/initializers/session_store.rb</code> looks like this:</p>

<pre><code># Be sure to restart your server when you modify this file.
FilteredWeb::Application.config.session_store :cookie_store, key: '_filtered-web_session', domain: :all
</code></pre>

<p>Someone also suggested changing the encryption key in <a href="http://pastebin.com/0ULya5d0" rel="nofollow noreferrer">config/initializers/devise.rb</a> but I don't see where to do this and neither do I understand the logic behind it.</p>

<p><strong>Versions</strong></p>

<pre><code>devise (2.2.3)
rails (3.2.13)
</code></pre>