Closed ganmahmud closed 6 months ago
Found the issue, it was due to how I was importing the jsonwebtoken package. Importing using CommonJS require syntax instead of ES6 import syntax, solved the problem.
I'm facing the same issue, Couldn't find anything so far.
It randomly redirects to auth.login route from random routes. I don't have jsonwebtoken anywhere in the app, how do i figure out which package is causing the issue.
GET /app/settings?_data=routes%2Fapp.settings 200 - - 2034.964 ms
[shopify-app/INFO] Authenticating admin request
GET /app?_data=routes%2Fapp._index 200 - - 1729.648 ms
GET /app 302 - - 3.049 ms
GET /auth/login 200 - - 6.904 ms
Issue summary
I am building an embedded admin app where I am fetching some data from an external API in the app._index.tasx -
This page rederns properly without any issue. But when navigating within the embedded app, the routes don’t seem to work as expected. I expect the route to go to the
app.template.$id.tsx
route but instead it redirects to theauth.login
page -From the log (provided bellow) It seems that the app bridge does not consider the URL search params in the component url
While debugging I found out that it does not happen when there is no data fetching or JWT sign happening in loader function.
Link component is supposed to take care of it and in my case it is acting as if I am not using Link component
App and System info
@shopify/shopify-app-remix
version: ^2.5.0Logs
Expected behavior
Should go the app.template.$id.tsx route
Actual behavior
Page redirects to auth.login route -
Steps to reproduce the problem