Closed rachel-carvalho closed 1 month ago
This makes sure the CurrentTenant is set to nil if gem is present whenever ShopifyApp ends the request in a before action, which happens:
CurrentTenant
nil
ShopifyApp
id_token
write_products
shopify app deploy
new_embedded_auth_strategy
false
HomeController#index
ProductsController#count
ProductsController#create
bundle
shops
Populate 5 products
shopify_app
gem "shopify_app", github: "Shopify/shopify_app", ref: "fix_current_tenant_error"
I couldn't find a nicer way to test the path of defined?(ClassName), I'd appreciate if anyone has better suggestions.
defined?(ClassName)
Anything else I'm missing?
Before submitting the PR, please consider if any of the following are needed:
CHANGELOG.md
README.md
/docs
What this PR does
This makes sure the
CurrentTenant
is set tonil
if gem is present wheneverShopifyApp
ends the request in a before action, which happens:id_token
or if it's invalid when using token exchangeReviewer's guide to testing
Steps to reproduce the error:
write_products
scope andshopify app deploy
new_embedded_auth_strategy
isfalse
HomeController#index
,ProductsController#count
andProductsController#create
bundle
and start the servershops
tablePopulate 5 products
Seeing the fix
shopify_app
in the Gemfile to this branch withgem "shopify_app", github: "Shopify/shopify_app", ref: "fix_current_tenant_error"
bundle
and restart the servershops
tablePopulate 5 products
Things to focus on
I couldn't find a nicer way to test the path of
defined?(ClassName)
, I'd appreciate if anyone has better suggestions.Anything else I'm missing?
Checklist
Before submitting the PR, please consider if any of the following are needed:
CHANGELOG.md
if the changes would impact usersREADME.md
, if appropriate./docs
, if necessary