Skip to content
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

Unable to configure New Universal Login with prompt config #114

Closed
finleye opened this issue Dec 11, 2020 · 2 comments · Fixed by #119
Closed

Unable to configure New Universal Login with prompt config #114

finleye opened this issue Dec 11, 2020 · 2 comments · Fixed by #119
Assignees
Labels

Comments

@finleye
Copy link

finleye commented Dec 11, 2020

Describe the problem

Unable to pass prompt values to configure New Universal Login when using omniauth-rails_csrf_protection
. The readme suggests passing these as query params when redirecting the user to Auth0, but when using the csrf protection gem, I'm using a POST request rather than a redirect.

What was the expected behavior?

I expect that I can pass prompt: { login: { description: 'Login to <OUR APPLICATION>' } } and see the New Universal Login reflect that copy change.

Reproduction

I've set the prompt key in the OmniAuth configuration as well as the query params for the POST request.

OmniAuth config

  1. Set the prompt argument when configuring OmniAuth.
  2. Attempt login and see the New Universal Login unchanged from its default.

Query String

  1. Set the params for the link generated for login within railse. i.e. <%= link_to 'Login', '/auth/auth0', params: { <PROMPT CONFIG> }, method: :post %>
  2. Attempt login and see the New Universal Login unchanged from its default.

Environment

  • Version of this library used: 2.4.1
  • Which framework are you using, if applicable: Rails 5
  • Other modules/plugins/libraries that might be involved: omniauth-rails_csrf_protection
  • Any other relevant information you think would be useful:
@davidpatrick davidpatrick added the needs investigation This needs to be investigated further before proceeding label Jan 4, 2021
@davidpatrick davidpatrick self-assigned this Jan 13, 2021
@davidpatrick davidpatrick added bug and removed needs investigation This needs to be investigated further before proceeding labels Jan 15, 2021
@davidpatrick
Copy link
Contributor

Thanks @finleye for raising this. Currently the library is pulling in the authorize parameters with Rack::Utils.parse_query(request.query_string), which only grabs the query from the URL. But it appears request.params it handled for us on POST and GET. I will open a PR to fix this.

@finleye
Copy link
Author

finleye commented Jan 19, 2021

Thanks @davidpatrick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants