I am trying to create a Shopify application using the session tokens. I am using koa-router for creating a rest API route and I need to get the shop name and body content.
issue - If I call this route through the frontend WITHOUT verifyRequest, it works( i can get a response back) but I cannot get the shop name or body or anything else.
If I add the verifyRequest() and then try I get this in the app console
You should pass the verifyRequest() function to the server, not to the router. If you use Koa-auth, then most likely you use for the server also use Koa. Try this way:
const Koa = require(‘koa’);
const server = new Koa();
server.use(verifyRequest());