cschiewek/devise_ldap_authenticatable — Issue #59: Rails 2.3.8 & 1.0.6 - LDAP authenticates, but stays on the same login screen
Author: pdindak
Created: 2011-11-04 21:58:22+00:00
State: open

Previous use of Devise database_authenticable, after successful login, pushed the user to the root page I defined in Devise.

I installed 1.0.6 for Rails 2 - Got it to Auth after some mods.
I have it set to create the user, it gets created fine. but now it will not go to the root page on success.

Devise/Warden updates the flash notice to say success, but still on the login page.
If I login after the user is created the first time, I get pushed to the root I expect.

Your strategy is the same as Devise's - success! to Warden

# to sign in page.
def authenticate!
if resource = mapping.to.authenticate_with_ldap(params[scope])
success!(resource)
else
fail(:invalid)
end

I know Devise uses this after sign-in:

def after_sign_in_path_for(resource_or_scope)
scope = Devise::Mapping.find_scope!(resource_or_scope)
home_path = "#{scope}_root_path"
respond_to?(home_path, true) ? send(home_path) : root_path
end

is there something you have seen blocking this to progress thru to the root known by Devise?

Thanks!