lib/omniauth/strategies/openid_connect.rb in omniauth-oauth_oidc-0.0.1 vs lib/omniauth/strategies/openid_connect.rb in omniauth-oauth_oidc-0.0.2

- old
+ new

@@ -53,10 +53,11 @@ option :send_nonce, true option :send_scope_to_token_endpoint, true option :client_auth_method option :post_logout_redirect_uri option :extra_authorize_params, {} + option :allow_authorize_params, [] option :uid_field, 'sub' option :pkce, false option :pkce_verifier, nil option :pkce_options, { code_challenge: proc { |verifier| @@ -185,9 +186,13 @@ opts.merge!(options.extra_authorize_params) unless options.extra_authorize_params.empty? if options.pkce opts.merge!(pkce_authorize_params) session["omniauth.pkce.verifier"] = options.pkce_verifier + end + + options.allow_authorize_params.each do |key| + opts[key] = request.params[key.to_s] unless opts.key?(key) end client.authorization_uri(opts.reject { |_k, v| v.nil? }) end