Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

App Bridge JWT token expires after 1 minute

Ari9
Excursionist
35 3 10

I have a Single-Page-App which uses App Bridge and manually fetches a token on page load with `getSessionToken`.

It seems like the token has it's expiry set to 1 minute only. This means after 1 minute, the token will not work with my backend app.

 

What am I missing? Why is the token set to expire only in 1 minute.. how should I be handling this?

banned
Reply 1 (1)

Cartbear
Tourist
9 0 3

Hi,

we call getSessionToken for each request. It looks similar to the example for axios in the help pages:

https://shopify.dev/tutorials/use-session-tokens-with-axios

Hope this helps!

MRG @ Cartbear
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution