title: Devise/Omniauth failure: How to debug it?
body: <p>After trying to "log in with Google", I'm seeing this error in the logs:</p>
  
  <pre><code>Processing by Users::OmniauthCallbacksController#failure as HTML
  </code></pre>
  
  <p>I can see all the data from google being sent through the URL (in the logs), including user email and name. So what could go wrong? My callbacks aren't even being executed. I only get redirected to the sign_in page of my site.</p>
  
  <p>And I'm pretty sure everything is configured correctly, because this was working fine some weeks ago. I don't think I changed anything. Facebook login still works fine.</p>
  
  <p>Any ideas on how to debug this failure? There is nothing else in the logs, other than those long URLs full of parameters and values. Only INFO messages. The one posted above is the only one that said something about a failure.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I added a 'failure' method to the controller</p>
  
  <pre><code>def failure
    render :text =&gt; params.inspect
  end
  </code></pre>
  
  <p>Which stopped the redirects, and printed this:</p>
  
  <pre><code>{}
  </code></pre>
  
  <p>The url was this:</p>
  
  <pre><code>/users/auth/google/callback?_method=post&amp;openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&amp;openid.mode=id_res&amp;openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&amp;openid.response_nonce=2012-04-16T12%3A25%3A49Z_v1fNngSQJaHBQ&amp;openid.return_to=http%3A%2F%2Fdev.myapp.me%3A3000%2Fusers%2Fauth%2Fgoogle%2Fcallback%3F_method%3Dpost&amp;openid.assoc_handle=AMlYA9Urw_lYamPphTSdQ9a6DU0Ez0y5RaDDM78qPL7Xgm77nMpJiB85&amp;openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.ext5%2Cext1.value.ext5%2Cext1.type.ext8%2Cext1.value.ext8%2Cext1.type.ext2%2Cext1.value.ext2&amp;openid.sig=2FPjo7U1e%2Fde248XpUgjQLduNAM%3D&amp;openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawk1F5U6x_-kJnydjoww5haU41tquh1Zl2c&amp;openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawk1F5U6x_-kJnydjoww5haU41tquh1Zl2c&amp;openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&amp;openid.ext1.mode=fetch_response&amp;openid.ext1.type.ext5=http%3A%2F%2Faxschema.org%2FnamePerson%2Ffirst&amp;openid.ext1.value.ext5=Some_User&amp;openid.ext1.type.ext8=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&amp;openid.ext1.value.ext8=some_email%40gmail.com&amp;openid.ext1.type.ext2=http%3A%2F%2Faxschema.org%2FnamePerson%2Flast&amp;openid.ext1.value.ext2=Some_User
  </code></pre>
  
  <p>So the thing is that all the data I need is in the URL, but devise/omniauth is not grabbing it (and apparently that's why it's calling the 'failure' method instead of my callbacks). I don't know if it should be accessible through the 'params' array, or what.</p>
  
  <p>I'm also intrigued about the <code>?_method=post</code> part, because all the requests to my site are GET requests. Maybe it just means that the request done by omniauth to google was POST.</p>
  
  <p>Any thoughts?</p>