title: Omniauth: callback not firing, returns failure with "invalid credentials"
body: <p>The facebook authentication in my Rails application, implemented with the <code>Omniauth</code> gem has stopped working recently. </p>
  
  <p>The problem is that the controller action, that should be used by the callback is not getting fired, and the process immediately skips to failure with "invalid credentials" message.</p>
  
  <p>log:</p>
  
  <pre><code>Started GET "/auth/facebook" for ::ffff:127.0.0.1 at 2017-03-29 11:12:29 +0200
  Started GET "/auth/facebook/callback?code=&lt;&lt;code&gt;&gt;&amp;state=&lt;&lt;state&gt;" for ::ffff:127.0.0.1 at 2017-03-29 11:12:30 +0200
  Started GET "/auth/failure?message=invalid_credentials&amp;origin=&lt;&lt;origin&gt;&gt;&amp;strategy=facebook" for ::ffff:127.0.0.1 at 2017-03-29 11:12:31 +0200
  Started GET "/login" for ::ffff:127.0.0.1 at 2017-03-29 11:12:31 +0200
  Processing by UserSessionsController#new as HTML
  </code></pre>
  
  <p>routes:</p>
  
  <pre><code>  match "/auth/failure" =&gt; redirect("/login"), :via =&gt; [:get, :post]
    match '/auth/:provider/callback' =&gt; 'user_sessions#create_omniauth', :via =&gt; [:get, :post]
    match '/auth/:provider/disconnect' =&gt; 'user_sessions#destroy_omniauth', :as =&gt; :destroy_auth, :via =&gt; :delete
  </code></pre>
  
  <p>Any ideas what could be wrong?</p>
  
  <p><strong>Edit:</strong>
  I had the same problem with Google authorization.</p>