{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/43fbca40654d5f38e4efed99836a183d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"43fbca40654d5f38e4efed99836a183d","url":"https://api.github.com/users/pdindak","login":"pdindak","id":526299},"milestone":null,"assignee":null,"updated_at":"2011-11-11T14:29:17Z","labels":[],"comments":3,"closed_at":null,"url":"https://api.github.com/repos/cschiewek/devise_ldap_authenticatable/issues/59","body":"Previous use of Devise database_authenticable, after successful login, pushed the user to the root page I defined in Devise.\r\n\r\nI installed 1.0.6 for Rails 2 - Got it to Auth after some mods to remove the ldap_authenticable requirement from the handler (no need to create the field in my db then)\r\nI have it set to create the user, it gets created fine. but now it will not go to the root page on success.\r\n\r\nDevise/Warden updates the flash notice to say success, but still on the login page.\r\nIf I login after the user is created the first time, I get pushed to the root I expect.   \r\n\r\nYour strategy is the same as Devise's - success! to Warden\r\n\r\n       # to sign in page.\r\n      def authenticate!\r\n        if resource = mapping.to.authenticate_with_ldap(params[scope])\r\n          success!(resource)\r\n        else\r\n          fail(:invalid)\r\n        end\r\n\r\nI know Devise uses this after sign-in:\r\n\r\n  def after_sign_in_path_for(resource_or_scope)\r\n        scope = Devise::Mapping.find_scope!(resource_or_scope)\r\n        home_path = \"#{scope}_root_path\"\r\n        respond_to?(home_path, true) ? send(home_path) : root_path\r\n      end\r\n\r\nis there something you have seen blocking this to progress thru to the root known by Devise?\r\n\r\nThanks!\r\n","html_url":"https://github.com/cschiewek/devise_ldap_authenticatable/issues/59","title":"Rails 2.3.8 & 1.0.6 - LDAP authenticates, but stays on the same login screen","number":59,"id":2148950,"created_at":"2011-11-04T21:58:22Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/1469c6f88d8fe3014f51d1b079ba4a36?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1469c6f88d8fe3014f51d1b079ba4a36","url":"https://api.github.com/users/antonjenkins","login":"antonjenkins","id":22539},"updated_at":"2011-11-11T14:29:17Z","url":"https://api.github.com/repos/cschiewek/devise_ldap_authenticatable/issues/comments/2708601","body":"I'm also having the double login problem when using config.ldap_create_user = true. I'm running the following:\r\n\r\n* rails 3.0.9\r\n* devise 1.4.2\r\n* devise_ldap_authenticatable 0.4.9\r\n* net-ldap 0.2.2\r\n\r\nThe first authentication attempt successfully binds to the LDAP and creates the user record in my database but doesn't actually authenticate me in the application. Attempting to authenticate again now that the user record is in the database works perfectly.","id":2708601,"created_at":"2011-11-11T14:29:17Z"}}