Coder Social home page Coder Social logo

Comments (4)

robdimarco avatar robdimarco commented on July 18, 2024

I upgraded this gem to the 1.0 version of OmniAuth, which I believe will fix this issue.

from omniauth_crowd.

combhua avatar combhua commented on July 18, 2024

I wanted to update this ticket. I've verified the issue still exists.

I have implemented a fix for my apps locally, but it may be less elegant due to my lack of understanding of the project(s). I've found that the fix in various places has been to use the callback_url method instead of the callback_path method.

callback_path does not include all the pieces necessary to take into account the scenarios where an application is deployed to a sub-uri. As a matter of fact, callback_path is a part of callback_url as defined in oa-core/lib/omniauth/strategy.rb:

def callback_url
    full_host + script_name + callback_path + query_string
end

Note this mistake also exists in the included "developer" strategy that comes with omniauth

I'll try to find some time soon (probably measured in weeks) to figure out how to write some tests to cover my change, verify what I'm doing doesn't break existing functionality and figure out how to submit it back to you. In the meantime, this might be useful for someone else or if someone with more time than me can get this fixed, that would also be awesome.

from omniauth_crowd.

robdimarco avatar robdimarco commented on July 18, 2024

Reopened this and added a pull request to make the change from callback_path to callback_url. If you have a better patch and/or tests I would love it, but I will try to test out the branch with the patch.

from omniauth_crowd.

robdimarco avatar robdimarco commented on July 18, 2024

Merged the change

from omniauth_crowd.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.