You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have configured the shopify_app gem and maintained the shopify_app initializer. You can see the code block below, and it is working fine on the production site.
I have now changed the entire UI in my application and want to offer the new version to select clients for beta testing. In the Shopify documentation, I found that we can create Custom Apps and manage distribution links for merchants, where we define the user's store and provide them with a link to test the app in real-time. https://shopify.dev/docs/apps/launch/distribution
To handle this, I want to configure the api_key, secret, and application_name at runtime, so the configuration adjusts dynamically when detecting that it is a beta version of the application.
My goal is to define the new configurations in the controller and call the method using before_action.
Please guide me how can I achieve this task.
# app/controllers/authenticated_controller.rb
class AuthenticatedController < ApplicationController
before_action :set_shopify_keys
def set_shopify_keys
ShopifyApp.configure do |config|
config.application_name = 'New App Name'
config.api_key = 'new-app-api-key'
config.secret = 'new-app-secret'
config.scope = 'read_products, write_products'
config.embedded_app = true
config.reauth_on_access_scope_changes = true
config.after_authenticate_job = false
config.shop_session_repository = 'Shop'
config.allow_jwt_authentication = true
config.api_version = '2023-10'
end
end
end
# Gemfile
gem 'shopify_app', '~> 18.1'
The text was updated successfully, but these errors were encountered:
Overview
I have configured the shopify_app gem and maintained the
shopify_app
initializer. You can see the code block below, and it is working fine on the production site.I have now changed the entire UI in my application and want to offer the new version to select clients for beta testing. In the Shopify documentation, I found that we can create Custom Apps and manage distribution links for merchants, where we define the user's store and provide them with a link to test the app in real-time.
https://shopify.dev/docs/apps/launch/distribution
To handle this, I want to configure the
api_key
,secret
, andapplication_name
at runtime, so the configuration adjusts dynamically when detecting that it is a beta version of the application.My goal is to define the new configurations in the controller and call the method using
before_action
.Please guide me how can I achieve this task.
The text was updated successfully, but these errors were encountered: