There was an error while loading. Please reload this page.
1 parent 473e152 commit 37753ddCopy full SHA for 37753dd
lib/omniauth_open_id_connect.rb
@@ -6,6 +6,7 @@ class OpenIDConnect < OmniAuth::Strategies::OAuth2
6
option :scope, "openid"
7
option :discovery, true
8
option :cache, lambda { |key, &blk| blk.call } # Default no-op cache
9
+ option :authorize_options, [:p]
10
11
option :client_options,
12
site: 'https://op.com/',
@@ -31,6 +32,10 @@ def request_phase
31
32
33
def authorize_params
34
super.tap do |params|
35
+ options[:authorize_options].each do |k|
36
+ params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
37
+ end
38
+
39
params[:scope] = options[:scope]
40
session['omniauth.nonce'] = params[:nonce] = SecureRandom.hex(32)
41
end
0 commit comments