Supabase Auth Plugin — Session Expiring After Tab Duplication or Inactivity

Hello WeWeb community,

I’m currently using the native Supabase Auth plugin in my WeWeb project. Everything works well at first, and I’m calling the “Refresh Token” action on every page load to keep the user authenticated.

However, after some time — especially when duplicating a browser tab or after a period of inactivity — the user session is lost and they are redirected to the login page, even though the refresh token action is running on page load.

Here are my questions:

  1. Does the Supabase plugin store the refresh_token in localStorage, or is it stored only in memory or sessionStorage?
  2. Is there a recommended way to persist the session reliably across page reloads or periods of inactivity?
  3. Are there any best practices you recommend to prevent session loss when using Supabase authentication in WeWeb projects?

Thanks in advance for your help!

Hi Vitor, yesterday Supabase was having a major issue with it’s API endpoints.

Can you check to see if this issue still persists?

Yes, this is a problem I’ve been having for a while, it has nothing to do with yesterday’s crash.

Alright, than I’m going to ask you to open a support chat: