Sha256: 13fe7d4083ab542cb64f6940b97edf06d3504df9020a42e481b419d9c71b4559
Contents?: true
Size: 773 Bytes
Versions: 1
Compression:
Stored size: 773 Bytes
Contents
require 'omniauth/strategies/oauth2' module OmniAuth module Strategies class Shopify < OmniAuth::Strategies::OAuth2 # Available scopes: content themes products customers orders script_tags shipping # read_* or write_* DEFAULT_SCOPE = 'read_products' option :client_options, { :authorize_url => '/admin/oauth/authorize', :token_url => '/admin/oauth/access_token' } option :callback_url option :provider_ignores_state, true uid { URI.parse(options[:client_options][:site]).host } def authorize_params super.tap do |params| params[:scope] ||= DEFAULT_SCOPE end end def callback_url options.callback_url || super end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-shopify-oauth2-1.1.1 | lib/omniauth/strategies/shopify.rb |