Hi,
I have a Node.js app created with the Shopify CLI. I added an app extension for the bulk actions on the order page, however once I receive the request. I get the information but I cannot load the the current session to then access the Graphql API.
app.get("/extension/orders/bulk", async(req, res) => {
console.log(req.query);
// Outputs
// {
// ┃ hmac: '111a4...',
// ┃ host: 'dGVz...',
// ┃ ids: ['4381574332601', '4381574070457', '4381573873849'],
// ┃ locale: 'en-CA',
// ┃ session:'2a1f891...',
// ┃ shop: 'tester12auth.myshopify.com',
// ┃ timestamp: '1650849240'
// ┃
// }
res.redirect(`/?shop=${req.query.shop}&host=${req.query.host}`);
const session = await Shopify.Utils.loadCurrentSession(req, res, true);
console.log(session); // Undefined
})
How can I get the current session from an App extension call. There is no session token in the headers.
Thanks