We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05f03f8 commit 9f9992bCopy full SHA for 9f9992b
lib/omniauth/strategies/oauth2.rb
@@ -3,6 +3,7 @@
3
require 'oauth2'
4
require 'omniauth'
5
require 'timeout'
6
+require 'securerandom'
7
8
module OmniAuth
9
module Strategies
@@ -48,7 +49,6 @@ def request_phase
48
49
50
def authorize_params
51
if options.authorize_params[:state].to_s.empty?
- require 'securerandom'
52
options.authorize_params[:state] = SecureRandom.hex(24)
53
end
54
params = options.authorize_params.merge(options.authorize_options.inject({}){|h,k| h[k.to_sym] = options[k] if options[k]; h})
0 commit comments