Hi everyone,
I’m working on a standalone Shopify app using the Node.js template, and I’ve run into a routing issue.
What I Want to Achieve:1. During the first installation of the app:
- The Shopify app should hit the api/auth/callback endpoint to handle authentication.
- After the app is installed:
- When the user clicks the app from their Shopify admin, it should hit the root endpoint (app.get(“/”)) instead of going through api/auth/callback again.
Current Problem:- If I define the root endpoint (app.get(“/”)), it gets called after installation, and the api/auth/callback endpoint is skipped entirely during installation.
- I need api/auth/callback to be called during the first installation and app.get(“/”) to be accessed after the installation when the app is launched.