title: Devise + Facebook + Omniauth callback stuck
body: <p>I'm using Devise + Rails 3. These are the gems I'm using:</p>
  
  <pre><code>gem 'devise' (1.3.4)
  gem 'mm-devise' (1.2)
  gem 'omniauth-facebook' (1.3.0)
  gem 'omniauth' (1.1.0)
  gem 'oauth2' (0.6.1)
  gem 'oa-core' (0.3.2)
  </code></pre>
  
  <p>I followed the <a href="https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview" rel="noreferrer">setup tutorial</a> on devise/omniauth wiki. </p>
  
  <pre><code>My routes:
  
  devise_for :users
  resources :events
  resources :posts
  resources :users
  root :to =&gt; "home#index"
  
  devise_scope :user do
    get "sign_in", :to =&gt; "devise/sessions#new"
  end
  
  devise_for :users, :controllers =&gt; { :omniauth_callbacks =&gt; "users/omniauth_callbacks" }
  </code></pre>
  
  <p>Facebook redirects me to: </p>
  
  <pre><code>http://localhost:3000/users/auth/facebook/callback. 
  </code></pre>
  
  <p>I see the request being stuck in Pending mode on the browser. The server log shows: </p>
  
  <pre><code>(facebook) Callback phase initiated.
  </code></pre>
  
  <p>but never passes this phase. I set up the callback as suggested in the tutorial:</p>
  
  <pre><code>class Users::OmniauthCallbacksController &lt; Devise::OmniauthCallbacksController
  
    def facebook
      ...
    end
  
    def passthru
      ...
    end
  end
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Thanks a lot!</p>