JWT get expired for rest api

Hey everyone,
For various reasons I’ve mentioned in this community, I moved most of my Supabase Postgres functions to REST APIs. However, after some time, I keep getting the “JWT expired” error and have to log out and log back in. Does anyone have a good solution for this? It drives me mad

I made a global workflow that checks if the jwt is expiring in the next 10 seconds or already expired, and refreshes it if so. I run this global workflow right before any REST request where I need a valid JWT

It will probably work, but I don’t think it’s ideal since this issue only occurs in the editor and not in the deployed app. I believe it’s a reasonable feature to request from the WeWeb team. @Agustin_Carozo

@thomlov can you please share the workflow you made?

Weweb could add an option to send JWT with the REST api request, and then also automatically handle the session refresh, yes. But as of now I add the JWT manually, and then weweb has no way of knowing that I need a refreshed token.

thank you :folded_hands: