intridea/omniauth — Issue #573: prefix_path = nil in Rails 3.2 causing error: No route matches [GET] "/auth/facebook"
Author: abravalheri
Created: 2012-02-02 22:25:14+00:00
State: open

Hi guys,

Recently, I was trying to upgrade some Rails 3.1 app using OmniAuth to Rails 3.2 and I get the following error:

```
ActionController::RoutingError (No route matches [GET] "/auth/facebook")
```

To investigate this error, I've used the rails console:

```ruby
strategy = OmniAuth::Strategies::Facebook.new(MyApp)
strategy.request_path
#=> "/facebook"
strategy.callback_path
#=> "/facebook/callback"
OmniAuth.config.path_prefix
#=> nil
```

Then I've realized that apparently there is a problem with the 'path_prefix', and I've tried to manually reconfigure it, writing in my initializer:

```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
configure do |config|
config.path_prefix = '/auth'
end
#...
end
```

So everything works fine again.

Has anyone already noticed this behavior?