App Bridge JWT token expires after 1 minute

App Bridge JWT token expires after 1 minute

Ari9
Excursionist
35 3 11

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
Replies 2 (2)

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
rony36
Shopify Partner
5 0 3

seems like that link does not work anymore @Cartbear