App reviews, troubleshooting, and recommendations
Hi, I am writing an app that has a custom action to do after a store owner has installed my app to their store.
The configuration for auth looks like this:
auth: {
path: "/api/auth",
callbackPath: "/api/auth/callback",
}
In the index.js file, I created a new path and its behaviour like this:
app.get("/api/auth/callback", (_req, res) => {
console.log('/api/auth/callback callback');
console.log('_req: ', _req);
console.log('res: ', res);
res.redirect("/");
});
However, when I installed my app to a store, I don't see _req and res being printed to the console. Am I missing something?
My goal is to create a new "store" entry in my database when a new store install the app. I thought doing it at the end of OAuth makes sense but not exactly sure how to do that.
Thanks!
It's hard to know what's wrong without more details about your setup. A few questions that would help shed more light on the issue:
@peterpot20 wrote:My goal is to create a new "store" entry in my database when a new store install the app. I thought doing it at the end of OAuth makes sense but not exactly sure how to do that.
Creating your store entry in the OAuth callback handler is the right place to do it.
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024