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

Add login_hint to permitted params #123

Merged
merged 4 commits into from
Apr 1, 2021
Merged

Conversation

Roriz
Copy link
Contributor

@Roriz Roriz commented Mar 2, 2021

As a aplication send username/email to auth0 universal login page. Auth0 already have feature to autofil username/email if has been sended.

Changes

Add login_hint on allow list of params of authorize_params

References

image
https://auth0.com/docs/universal-login/new-experience#login

Testing

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

Workaround

config/initializers/auth0.rb

Rails.application.config.middleware.use OmniAuth::Builder do
  options({
    login_hint: lambda do |env|
      Rack::Utils.parse_query(env['rack.input'].gets)['login_hint']
    end
  })

  provider(
    :auth0,
    auth0_client_id
    auth0_client_secret,
    auth0_domain,
    callback_path: '/auth/auth0/callback',
    authorize_options: ['login_hint']
  )
end

@Roriz Roriz changed the title Patch 1 Add login_hint to permitted params Mar 2, 2021
@Roriz Roriz marked this pull request as ready for review March 2, 2021 18:13
@Roriz Roriz requested a review from a team as a code owner March 2, 2021 18:13
@davidpatrick davidpatrick added this to the v milestone Apr 1, 2021
@davidpatrick davidpatrick merged commit 59dc9b7 into auth0:master Apr 1, 2021
@davidpatrick davidpatrick mentioned this pull request Apr 1, 2021
@Roriz Roriz deleted the patch-1 branch April 1, 2021 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants