Class: OmniAuth::Strategies::ProductHunt
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::ProductHunt
- Defined in:
- lib/omniauth/strategies/product_hunt.rb
Constant Summary collapse
- DEFAULT_SCOPES =
%w[public private].freeze
Instance Method Summary collapse
Instance Method Details
#authorize_params ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/omniauth/strategies/product_hunt.rb', line 20 def super.tap do |params| scope = params[:scope].to_s.split(/\s+/) scope = scope.concat(DEFAULT_SCOPES.reject {|s| scope.include?(s) }) params[:scope] = scope.join(" ") end end |
#callback_url ⇒ Object
16 17 18 |
# File 'lib/omniauth/strategies/product_hunt.rb', line 16 def callback_url [:redirect_uri] || full_host + script_name + callback_path end |
#raw_info ⇒ Object
48 49 50 |
# File 'lib/omniauth/strategies/product_hunt.rb', line 48 def raw_info @raw_info ||= deep_symbolize(access_token.get("/v1/me").parsed) end |