TL;DR : Refresh token NOT WORKING with the Supabase Auth plugin
_
For a new project, I’ve recently started to use the supabase Auth plugin.
I sometimes get ‘Unauthorized’ errors in the editor because my supabase access token is not valid anymore.
And when this happens, I’ve noticed that I automatically get a new access token, not so long after…
Last time I’ve checked, the new access token came about 40 seconds later.
That’s bad. Because, if the same thing happen on my live app, then the flow is going to get broken, and my user is going to be left with an error.
Sure, I could add a manual check to refresh the token, but in that case, what is the purpose of the Auth plugin ?
I’m used to do everything manually, and have a refresh token action at the beginning of all my WFs. It checks if my supabase token is expired, and if it is, then I make an API call to get the new access token.
And I am in control of when and where I get the refresh token.