-
-
Notifications
You must be signed in to change notification settings - Fork 970
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
Omniauth failed to detect the url -> Authentication passthru #1079
Comments
Just to +1 this, such a messy bug to catch. My setup was a NGINX proxy_pass in a Dockerfile routing The bug is that in NGINX if your Either way, half my weekend spent on a missing |
Configuration
omniauth
Rails 7
Problem and easy fix
I don't know why, but inside omniauth strategy, the
current_path
is always with double/
i.e.
//users/auth/xxx
instead of/users/auth/xxx
So it makes the method
omniauth/lib/omniauth/strategy.rb
Lines 293 to 295 in 66110da
always returning false. Then the middleware do not catch the route and it always ends up with
Authentication passthru
(note that is only hapenning on my production env, not on my local dev)An easy fix is to change the method to following
to
I know this is probably a problem linked to my app, but I have struggling 4hours on this. It's a easy change that could save time for others
Thank you !
Sebastian
Ps: sorry I have been lazy for not submitting a PR for such small change
The text was updated successfully, but these errors were encountered: