Class: OmniAuth::Strategies::GitHub

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

Constant Summary collapse

DEFAULT_SCOPE =

OAuth client settings

'user'

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



38
39
40
41
42
43
44
45
46
47
# File 'lib/j1_app/omniauth/strategies/github.rb', line 38

def authorize_params
  super.tap do |params|
    %w[scope client_options].each do |v|
      if request.params[v]
        params[v.to_sym] = request.params[v]
      end
      params[:scope] = get_scope(params)
    end
  end
end

#callback_urlObject



49
50
51
# File 'lib/j1_app/omniauth/strategies/github.rb', line 49

def callback_url
  options[:redirect_uri] || full_host + script_name + callback_path
end

#request_phaseObject



34
35
36
# File 'lib/j1_app/omniauth/strategies/github.rb', line 34

def request_phase
  super
end