Closed JesJehle closed 1 month ago
If you enable this, the Python process does not end. Thus, ie. the cog generation python process will keep on running forever. There is no easy way around this. It is a very weird design decision by supabase and there are many, many issues concerning this. In the past, they frequently kept on changing this behaviour, which broke my code regularly and almost made me move away from supabase. We should definitely keep an eye on this and try new supabase client versions from time to time, as it is the client library's responsibility to refresh the token, and not ours.
To test, you can write a login function similar to ours, grab something from the database and end python without logging out (as auth is done by the website, not the API). If you log out in python, the token is invalidated and the user needs to log in again.
What is the reason to not allow auto refresh of jwt? https://github.com/Deadwood-ai/deadwood-api/blob/0e781fddc871c5e04d2d60aeaf76aba437b190b7/src/supabase.py#L27-L28