incorrect url passed to omniauth login form
Closed
incorrect url passed to omniauth login form
Created by: sunbit
If you deploy gitlab under a subpath
the action in the login form for ldap authorization is not valid, as it appears to be hardcoded as "/users/auth/ldap", and when users log in, ends in a invalid path on the domain root. modifying the form to harcoded-including the "git" subpath in the form temporally solves it.
I don't know if this url has to be configured somewhere, or its an error on generating the url not taking into account the real url. I don't have any knowledge of rails nor ruby, but experience with other web frameworks tell me that is something in that way
Created by: patthoyts
This is giving me trouble also. I got LDAP authentication working fine with gitlab as a standalone rails application. When I integrated this into the apache server using Passenger I moved it to localsite.com/gitlab/ and while everything else works, the LDAP authentication now fails. The problem is that for the LDAP form, the action is set to the absolute url of '/users/auth/ldap/callback'. This is constructed in the OmniAuth::Form code. It looks to me like the url can be passed in as a parameter but I don't see where this should be done in the gitlab application. Something to do with user_omniauth_authorize_path is as close as I can identify.
By Administrator on 2012-02-29T12:21:42 (imported from GitLab project)
Created by: rspeicher
I don't have access to an LDAP server for testing, but try this:
open
app/views/devise/sessions/_new_ldap.html.erb
-<%= form_tag(user_omniauth_callback_path(:ldap), :class => "login-box", :id => 'new_ldap_user' ) do %> +<%= form_tag(user_omniauth_callback_url(:ldap), :class => "login-box", :id => 'new_ldap_user' ) do %>
Change
user_omniauth_callback_path
touser_omniauth_callback_url
.By Administrator on 2012-08-11T00:11:43 (imported from GitLab project)