Closed tak1n closed 1 year ago
Any chance to reflect this also in tests?
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any chance to reflect this also in tests?
Sry, missed that completely. Will add some tests this weekend.
@simi adapted the tests accordingly. Had to update the mocha setup as well removed MultiJson
usage. MultiJson is not declared as a dependency anywhere, I also decided against introducing it as a dependency as it seems to be in a somewhat limbo state in regards to maintenance (no ruby 3+ support, last commit in 2020).
Thanks!
First, thanks for providing and maintaining this gem, it helped us integrate with facebook and providing some products on top of it for quite some time. Lately, we found an issue with our setup. We have a rails application running behind a reverse proxy and as we use Sidekiq and want to keep using the Sidekiq Web UIs we set
SCRIPT_NAME
as env var.This led to some weird behaviour with omniauth-facebook/omniauth though, the
redirect_uri
started to contain theSCRIPT_NAME
part twice. When digging through the code we can seeomniauth-facebook
usesscript_name
to construct thecallback_url
in https://github.com/simi/omniauth-facebook/blob/master/lib/omniauth/strategies/facebook.rb#L88.Taking a look at omniauth we can then see
callback_path
is as well constructed withscript_name
in it (https://github.com/omniauth/omniauth/blob/master/lib/omniauth/strategy.rb#L450). The fix to rely on the default values here while still being able to setSCRIPT_NAME
would be to get rid of the usage inomniauth-facebook
.