Hi, I just created a new shopify public app by following the official documentation of an app and I came across and error ‘handling response’. I opened the network tab and I get the unauthorized error as you can see in the attached photo.
I added the shopify api key, secret key and shopify app url but it is still not working
This is most commonly caused because you need to sync the clock on your computer. If you clock is out of sync on your computer. This means that when we try to authenticate the JWT it will come back as expired.
To resolve this you will need to go into your computer settings and synchronize your clock.
Hi.
You don’t provide much to go on but one thing i noticed. You say that you added shopify api key, secret key and shopify app url. If you spin up a remix app template you should not have to handle those manually.
If you do: shopify app init and auto url update and then shopify app dev. You should be able to see your app in your partner account. Click text your app and ad you dev store. Back to cli and do shopify app deploy. You should have an environment that works out of the box.
I came to the solution for this problem. You are getting the error related to "nbf" claim timestamp check failed, which means the token is not valid before the time given in the payload of your JWT.
You can check the "nbf", "iat", and "exp" values in the payload using any JWT decoder, and then check your server time. If there is a time difference, you will get this error.
Sync your system time clock or manually set the time correctly.