Skip to content

Commit 9f9992b

Browse files
author
AlexanderPavlenko
committed
😱
1 parent 05f03f8 commit 9f9992b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/omniauth/strategies/oauth2.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require 'oauth2'
44
require 'omniauth'
55
require 'timeout'
6+
require 'securerandom'
67

78
module OmniAuth
89
module Strategies
@@ -48,7 +49,6 @@ def request_phase
4849

4950
def authorize_params
5051
if options.authorize_params[:state].to_s.empty?
51-
require 'securerandom'
5252
options.authorize_params[:state] = SecureRandom.hex(24)
5353
end
5454
params = options.authorize_params.merge(options.authorize_options.inject({}){|h,k| h[k.to_sym] = options[k] if options[k]; h})

0 commit comments

Comments
 (0)