Hey ,
Can someone help me to achieve shopify OAuth in my node app I have submitted my app for review but it got rejected saying that u didn’t implement OAuth but app has this code and i think it working same as OAuth does please tell what can i do
app.get(shopify.config.auth.path , shopify.auth.begin())
app.get(
shopify.config.auth.callbackPath,
shopify.auth.callback(),
async(req,res,next)=>{
const getInfo = await shopify.api.rest.Shop.all({
session: res.locals.shopify.session,
});
const subject = “A letter from the founder”
// Webhook installation
addWebhook(res.locals.shopify.session)
// Store storedetails
const getStore = await StoreModel.findOne({shop:res.locals.shopify.session.shop});
if(!getStore){
const insertDetails = {
shop : res.locals.shopify.session.shop,
Email : getInfo[0].email,
Status: “active”,
created_at : new Date(),
modified_at : new Date()
}
const createStore = new StoreModel(insertDetails)
await createStore.save();
}
else{
await StoreModel.updateOne({shop : res.locals.shopify.session.shop} , {Status : “active”});
}
next();
},
shopify.redirectToShopifyOrAppRoot(),
);
app.post(
shopify.config.webhooks.path,
shopify.processWebhooks({ webhookHandlers: GDPRWebhookHandlers })
);
Thank you