auth0 / omniauth-auth0

OmniAuth strategy to login with Auth0
MIT License
125 stars 67 forks source link

Specifying callback_uri #102

Closed emad-elsaid closed 4 years ago

emad-elsaid commented 4 years ago

Description

We're using omniauth-auth0 gem in a sinatra application, when the gem redirects to auth0 for authenticating a user it sends a parameter for callback_uri, by default it's /auth/auth0/callback.

Our service will be served under a path prefix, meaning all paths will have a fixed prefix "/service-name/" so we'll need to specify this callback_uri parameter.

With the current implementation the user will be redirected back to /auth/auth0/callback which doesn't hit the service in the first place, as /auth doesn't start with the service prefix so it won't map to it.

I tried to search for a way in the past couple days related to omniauth or omniauth-auth0 but failed to find any thing that works.

Environment

emad-elsaid commented 4 years ago

I had to reimplement the login logic myself to overcome this limitation, as this have been here for 7 days without response I decided to move on and get rid of my dependency on omniauth and omniauth-auth0 gems from my project, the implementation was under 30 lines of code