Sha256: 6998c7c844bf4adb17a9bfaeb9aafc376adc71709127ea7e54df671a29b194b9

Contents?: true

Size: 639 Bytes

Versions: 11

Compression:

Stored size: 639 Bytes

Contents

# frozen_string_literal: true

provider :shopify,
  ShopifyApp.configuration.api_key,
  ShopifyApp.configuration.secret,
  scope: ShopifyApp.configuration.scope,
  per_user_permissions: ShopifyApp.configuration.per_user_tokens,
  setup: lambda { |env|
    strategy = env['omniauth.strategy']

    shopify_auth_params = strategy.session['shopify.omniauth_params']&.with_indifferent_access
    shop = if shopify_auth_params.present?
      "https://#{shopify_auth_params[:shop]}"
    else
      ''
    end

    strategy.options[:client_options][:site] = shop
    strategy.options[:old_client_secret] = ShopifyApp.configuration.old_secret
  }

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
shopify_app-12.0.7 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-12.0.6 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-12.0.5 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-12.0.4 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-12.0.3 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-12.0.2 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-12.0.1 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-12.0.0 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-11.7.1 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-11.7.0 lib/generators/shopify_app/install/templates/shopify_provider.rb
shopify_app-11.5.0 lib/generators/shopify_app/install/templates/shopify_provider.rb