Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Empty env['omniauth.params'] on callback #115

Open
dvkch opened this issue Nov 28, 2024 · 2 comments · May be fixed by #118
Open

Empty env['omniauth.params'] on callback #115

dvkch opened this issue Nov 28, 2024 · 2 comments · May be fixed by #118

Comments

@dvkch
Copy link

dvkch commented Nov 28, 2024

Hi there,

I have been using omniauth in a Rails app for multiple models, currently adding a param on the authorization URL to known which class to create once redirected. Unfortunately the current implementation of callback_url in this gem ignores the query params. The original implementation of this method in the base OAuth strategy correctly adds this query string.

Would it be possible to change

        options[:redirect_uri] || (full_host + callback_path)

into

        options[:redirect_uri] || super

Thanks for considering!

@wJoenn
Copy link

wJoenn commented Feb 14, 2025

I opened a PR that should fulfil your need if I understand you correctly. Can you perhaps have a look at it and tell me if that helps you ?
#118

It also includes an example of how to monkey patch the callback_url method locally so that you can have what you need immediately until omniauth-apple answers your need if it ever does

@dvkch
Copy link
Author

dvkch commented Feb 22, 2025

This seems perfect ! And the monkey patch is indeed what i am currently doing to work around this to :) Thank you for handling this !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants