I've been trying to rework an app to use the new session auth system.
Everything seems to work fine, however I am not able to use the Navigation
(polaris) component successfully.
Let's say I have something like this :
<Navigation.Section
items={[
{
url : '/faq',
label : translations.faq,
icon : HintMajor
}
]}
/>
If I only put /faq
I am unable to access the route. I am redirected to /auth
and get obviously an error.
The only way I manage to make my routes work is to :
- Add the shop query in each url like this :
// ...
url : '/faq?shop=${shop}',
// ...
- Add every needed routes manually in my
server.js
WITHOUT theverifyRequest
middleware (which does not seem like a good option to me)
// ...
router.get('/faq', handleRequest)
// ...
Can someone explain if I am doing anything wrong ? (I am managing my SESSION_STORAGE with the custom redis storage shown in the repo doc https://github.com/Shopify/shopify-node-api/blob/main/docs/usage/customsessions.md)