Hey Liam I’m having the same issue with my app as well and I am using this Shopify API Express package: @shopify/shopify-app-express
Here is a link to the package: @shopify/shopify-app-express - npm
This is what my code looks like:
const { MySQLSessionStorage } = require('@shopify/shopify-app-session-storage-mysql');
//Set up Shopify API package
const { shopifyApp } = require('@shopify/shopify-app-express');
const shopify = shopifyApp({
api: {
apiKey: process.env.SHOPIFY_CLIENT_ID,
apiSecretKey: process.env.SHOPIFY_CLIENT_SECRET,
scopes: process.env.SHOPIFY_API_SCOPES.split(','),
hostName: process.env.APP_URL,
hostScheme: 'https'
},
auth: {
path: '/shopify/auth',
callbackPath: '/shopify/auth/redirect'
},
webhooks: {
path: '/api/webhooks'
},
sessionStorage: MySQLSessionStorage.withCredentials(
config.host,
config.database,
config.username,
config.password,
{
connectionPoolLimit: 10,
port: config.port || 3306,
onError: (err) => console.error('Session DB error:', err)
}
),
});
//Begin Shopify Auth
app.get(shopify.config.auth.path, shopify.auth.begin());
app.get(
shopify.config.auth.callbackPath,
shopify.auth.callback(),
authController.saveShopInfo.bind(authController),
shopify.redirectToShopifyOrAppRoot()
);
The interesting about this is that my app was working just fine all last week. I decided to uninstall it and re-install it so that I can update the app permissions and then ran into this issue.
Any ideas on what I might be doing wrong?
I’m not sure why OAuth cookie is missing from the Shop Url.