class OmniAuth::Strategies::Qualtrics

Public Instance Methods

authorize_params() click to toggle source

Override authorize_params so that we can be deliberate about the value for state and not use the session which is unavailable inside of an iframe for some browsers (ie Safari)

# File lib/omniauth/strategies/qualtrics.rb, line 29
def authorize_params
  # Only set state if it hasn't already been set
  options.authorize_params[:state] ||= SecureRandom.hex(24)
  params = options.authorize_params.merge(options_for("authorize"))
  if OmniAuth.config.test_mode
    @env ||= {}
    @env["rack.session"] ||= {}
  end
  params
end