I want to use the shopify-node-api library to conduct OAuth to connect to my clients’ Shopify store to view products.
My config looks like so:
const shopifyConfig = {
shop: 'marketpryce-test.myshopify.com',
api_key: process.env.SHOPIFY_API_KEY,
shared_secret: process.env.SHOPIFY_SECRET_KEY,
redirect_uri: 'localhost:3000/matches',
shopify_scope: 'read_products',
nonce: randomUUID()
};
I’m calling the buildAuthUrl() function which generates a url with the client_id param set like so:
client_id=undefined
I’ve logged my env variable at runtime and it is successfully getting my API Key and Secret Key for my app so I’m not sure why the client_id is coming up undefined.
Does my app need to be in a different state in order to successfully complete the OAuth workflow? I’m trying to test it using a development store that I’ve created.