Skip to content

Callback path isn't aware of sub-directory placement #753

Closed

Description

@btrepp

I'm using rails 4 and omniauth-ldap,deploying with warbler in glassfish. Looking through the source its grabbing callback_path from omniauth core.

For some reason the rest of the rails app works fine, even the login pages, but the callback URL is going to the root of the webserver, this conflicts with how glassfish is deploying the applications.

http://glassfishserver/application/users/auth/ldap is the form. This posts to
http://glassfishserver/users/auth/ldap/callback.

To be honest I'm not sure if this is being covered by rails automagic everywhere else, or jboss/glassfish magic, but it's causing issues with omniauth. Does anyone know of an elegant way to fix it?. It works fine in development which isn't put in a subfolder, but doesn't in production and the jboss/glassfish subfolder.

Activity

  1. btrepp commented on Jun 17, 2014

    @btrepp
    Author

    Thats acceptable as a workaround, but now I would have to be checking am I in development or am I in production and setting the URL accordingly, somewhat annoying as the rest of rails works fine, just omniauth fails to generate the correct routes.

    I've found this aswell
    heartcombo/devise#875
    Though it was closed with no resolution.

    It would probably be nicer to have omniauth generate the correct URLs in the first place.

  2. aldanor commented on Mar 10, 2015

    @aldanor

    +1, afaik this is still not resolved?

  3. added theissue type on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions