title: Facebook Auth / CORS preflight and Omniauth
body: <p>I'm implementing a facebook authentication with client side flow.
  After that, I'd like to integrate with the Omniauth framework on backend using the cookies strategy.
  The problem is that after login on facebook and try to call the Omniauth callback, on the preflight requisition (<code>OPTIONS</code>), my global option route is not recognized and the backend doesn't return any CORS headers.</p>
  
  <p>Route definition:</p>
  
  <pre><code>  match '*path', to: 'application#handle_options_request', constraints: {:method =&gt; 'OPTIONS'}
  </code></pre>
  
  <p>When calling the callback, it never passes on <code>application#handle_options_request</code>:</p>
  
  <pre><code>[2014-09-02 18:02:25] INFO  Rails : Started OPTIONS "/users/auth/facebook" for 127.0.0.1 at 2014-09-02 18:02:25 +0100
  </code></pre>
  
  <p>All the others <code>OPTION</code> request based are routed fine but not this one above.
  Has anyone already faced this problem?</p>
  
  <p>====</p>
  
  <p>Omniauth routes</p>
  
  <pre><code>$ bundle exec rake routes
  
    user_omniauth_authorize GET|POST /users/auth/:provider(.:format)        authentications#passthru {:provider=&gt;/facebook|google_oauth2|twitter/}
    user_omniauth_callback GET|POST /users/auth/:action/callback(.:format)  authentications#(?-mix:facebook|google_oauth2|twitter)
  </code></pre>