Hello Shopify Community,
We recently built a new Shopify app using Remix and theme app extension, which replaces our older custom app. In the old app, we used to save:
-
shop and accessToken in a Shop collection
-
shop and appearance customization data in an AppearanceSetting collection
? Problem:
We have the following issue during data migration:
-
Our AppearanceSetting collection has 7000+ shops
-
Our Shop collection has only 4000 shops
-
That means around 3000 appearance settings exist without a corresponding shop/access token entry
Now, for migrating data to the new app, we need to:
Questions:1. Is it possible to get or regenerate the accessToken for those 3000 missing shops if we only have their shop domain (like myshop.myshopify.com) but they don’t exist in our old Shop collection?
-
If yes, then what is the correct way to regenerate or retrieve the access tokens securely for those existing users? Can we trigger re-authentication?
-
For the new app, we’re now handling all appearance settings via the Shopify Theme App Extension (TAE) instead of saving it in the database.
So, we want to:
-
Automatically apply the old saved appearance settings for migrated customers (those 7000 shops)
-
Apply default appearance settings for new installs via the TAE
-
What We Need Help With:- Can we programmatically regenerate or retrieve access tokens for existing merchants just by having their shop domain?
-
Is there a secure way to re-auth them via the app bridge or embedded UI?
-
How to inject old appearance data into the Theme App Extension block automatically for migrated users without database reliance?
Any guidance or suggestions would be highly appreciated!
Thank you! ![]()