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 option to restrict overriding authorize_options by user request #423

Merged
merged 1 commit into from
Sep 3, 2022

Conversation

tnantoka
Copy link
Contributor

Thank you for the great gem!

By the following implementation, all authorize_options can be overridden with request parameters.

options[:authorize_options].each do |k|
params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
end

For example, even if we restrict it with hd: 'exanple.com', end-users can use any hd with /oauth/google_oauth2?hd=example.net.
It's flexible and convenient, but it may be unexpected behavior in some apps.

I have added an option to control this behavior with this pull request.
If you don't need this change, feel free to close it.

Thanks,

@zquestz zquestz merged commit d7e862c into zquestz:master Sep 3, 2022
@zquestz
Copy link
Owner

zquestz commented Sep 3, 2022

Thanks, decided this should go in. Appreciate the work. =)

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

Successfully merging this pull request may close these issues.

2 participants