plataformatec/devise — Issue #1390: undefined method `new_session_path` for omniauth_callbacks controller
Author: riffraff
Created: 2011-10-17 08:18:33+00:00
State: open

this error appeared in our codebase since an upgrade from 1.3.4 to 1.4.8, and it seems somewhat related to similar errors reported recently. I consistently happens whenever an authorization is denied by the user and we end up on the failure side of the omniauth controller. Our code in callbacks controller is pretty much identical to that in the docs/wiki and worked fine in the past.
We also see the error when hitting the recovery password page, similarly to an already reported and closed issue.

In our case the route code looks like

devise_for :users , :controllers => {
:omniauth_callbacks => "omniauth_callbacks" ,
:registrations => 'registrations',
:sessions =>'sessions'
}

and the quick fix was to simply add

def new_session_path *args
new_user_session_path *args
end

to our ApplicationController