Token Expiry Issue When Using Extension #74
Unanswered
AminRafaey
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Why are you not using the |
Beta Was this translation helpful? Give feedback.
0 replies
-
@kinngh But verifyCheckout is only assigning req.user_shop = shop — it doesn’t actually handle or validate the session itself. So I’m not sure how it’s supposed to help in preventing the 401 errors. I’ve already added it, but I’m still getting 401 responses intermittently. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @kinngh, I’m running into a specific issue with the extension part of the app and wanted to ask for your insight. I am using your repo as a starter template.
🐞 Problem
Everything works perfectly when users access the embedded app. However, when they try to use the extension directly (e.g., via the product or order page), they get an authentication error because the token seems to have expired.
Once the user opens the main app manually, the token gets refreshed and the extension starts working fine afterward.
❓Question
How can I proactively ensure the session/token is refreshed or valid before a user interacts with the extension?
Is there a recommended pattern you suggest for keeping the session alive or refreshing it in the background when the extension loads?
Thanks again for the great work and looking forward to your advice!
Beta Was this translation helpful? Give feedback.
All reactions