Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The omniauth.origin is nil in rack production environment? #35

Open
njman opened this issue Jun 16, 2015 · 0 comments
Open

The omniauth.origin is nil in rack production environment? #35

njman opened this issue Jun 16, 2015 · 0 comments

Comments

@njman
Copy link

njman commented Jun 16, 2015

I launched the gollum&omnigollum&omniauth-ldap via unicorn way: unicorn -c unicorn.rb -E production. Test the login failure scenario.

And found omniauth.origin is nil:

      app.before options[:route_prefix] + '/auth/failure' do
        user_deauth
        @title    = 'Authentication failed'
        @subtext = "Provider did not validate your credentials (#{params[:message]}) - please retry or choose another login service"
        @auth_params = "?origin=#{CGI.escape(request.env['omniauth.origin'])}" unless request.env['omniauth.origin'].nil?
        if request.env['omniauth.origin'].nil?
         puts 'Noop, why omniauth.origin is nil??'
        end
        puts "auth failure #{@auth_params}"
        show_error
      end

Which led loginurl be set incorrect.

However, the omniauth.origin was set right in front web page if rack was in development environment.

How to handle this problem? thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant