Different refresh outcomes on different environments
I'm using clojurescript with supabase, and, when running on local (watch), supabase automatically refreshes the token whenever it expires. This is consistent, even if I exit the page and enter long after the token expires.
The problem is that this doesn't happen when I bundle the project in a static file. Login and other auth operations work flawlessly, of course, just the refresh flow jusn't happen, right after the first expiration.
What I think is happening: Since in local I'm running a constant watch, supabase might keep a state, even if the page isn't running on a browser. So it knows that a token needs refresh just based on the server state. Which doesn't happen when deployed, since Supabase just exists as long as a page is open.
The problem is that this doesn't happen when I bundle the project in a static file. Login and other auth operations work flawlessly, of course, just the refresh flow jusn't happen, right after the first expiration.
What I think is happening: Since in local I'm running a constant watch, supabase might keep a state, even if the page isn't running on a browser. So it knows that a token needs refresh just based on the server state. Which doesn't happen when deployed, since Supabase just exists as long as a page is open.