Class: OmniAuth::Strategies::WorkOS

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/workos.rb

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



68
69
70
71
72
73
74
75
# File 'lib/omniauth/strategies/workos.rb', line 68

def authorize_params
  super.tap do |params|
    options[:authorize_options].each do |key|
      value = request.params[key]
      params[key] = value unless blank?(value)
    end
  end
end

#callback_phaseObject



87
88
89
90
91
# File 'lib/omniauth/strategies/workos.rb', line 87

def callback_phase
  super
rescue Error => e
  fail!(e.code, e)
end

#request_phaseObject



77
78
79
80
81
82
83
84
85
# File 'lib/omniauth/strategies/workos.rb', line 77

def request_phase
  if blank?(options.client_id)
    fail!(:missing_client_id)
  elsif blank?(options.client_secret)
    fail!(:missing_client_secret)
  else
    super
  end
end