You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I am investigating an issue that is presenting itself in the following manner:
By starting my nuxt app in debugging mode and comparing two memory snapshots I was able to identify an excess amount of timers created:
Using the debugger I was able to trace this back to the startAutoRefresh function of the supabase gotrue client, which is called everytime the auth client is created.
Here's what I believe happens:
Each time I call serverSupabaseUser() (per h3 event) a new SupabaseAuthClient is created
Each time a SupabaseAuthClient is created, a new setInterval timer is started, and they are not cleaned up
My questions are:
Is the creation of a new supabase auth client per request expected?
I see that the supabaseClient is attached to the event here. Is there a way we can destroy or clean it up at the end of the request?
Do you have any insight into why it is necessary for the server side code to keep timers running for refresh tokens? Could disabling this be an option?
Hello!
I am investigating an issue that is presenting itself in the following manner:
By starting my nuxt app in debugging mode and comparing two memory snapshots I was able to identify an excess amount of timers created:
Using the debugger I was able to trace this back to the startAutoRefresh function of the supabase gotrue client, which is called everytime the auth client is created.
Here's what I believe happens:
My questions are:
Is the creation of a new supabase auth client per request expected?
I see that the supabaseClient is attached to the event here. Is there a way we can destroy or clean it up at the end of the request?
Do you have any insight into why it is necessary for the server side code to keep timers running for refresh tokens? Could disabling this be an option?
Thanks!
===
node 19.1.0
nuxt 3.2.0
nuxt/supabase 0.3.1
gotrue-js 2.4.2
supabase/supabase-js 2.7.1
The text was updated successfully, but these errors were encountered: