title: Rails 3.1 OmniAuth with Facebook - Failure, but dont send error
body: <p>I'm facing a weird problem.</p>
  
  <p>I followed this tutorial : <a href="https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview" rel="nofollow">https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview</a></p>
  
  <p>It works perfectly with the exact same code on my local machine (with modification on APP_ID and SECRET).</p>
  
  <p>But when I test it on another server, I cant get logged in with Facebook informations...</p>
  
  <p>I click on the link (&lt;%= link_to 'register with fb', user_omniauth_authorize_path(:facebook) %>) then I'm redirected well to Facebook which asks me if I allow the app and finally I get redirected to my site.</p>
  
  <p>But I'm redirected to /user/sign_in ! And no record with the user retrieved from Facebook is created.</p>
  
  <p>The log gives me :</p>
  
  <blockquote>
    <p>Started GET "/users/auth/facebook" for 192.168.1.254 at 2011-07-25 19:06:11 +0400</p>
    
    <p>Started GET "/users/auth/facebook/callback?code=grV09GQr[...]BbcM-mxklOu5E"</p>
    
    <p>for 192.168.1.254 at 2011-07-25 19:06:12 +0400   Processing by
    Users::OmniauthCallbacksController#failure as HTML   Parameters:</p>
    
    <p>{"code"=>"grV09GQrqjDepasyQpVhqSg0FINlr4h9[...]sSUooMrBRxBbcM-mxklOu5E"}</p>
    
    <p>Redirected to <a href="http://mysite.com/users/sign_in" rel="nofollow">http://mysite.com/users/sign_in</a> Completed 302 Found in
    1ms</p>
  </blockquote>
  
  <p>Someone has an idea ?
  Many Thanks</p>