I don't understand how did you handle the session management here. You are using getSession() method from supabase js on your background script but it can't turn anything because supabase can't initialize session on your extension on the background script.
I am using oauth client to login with my background script. I can login but I can't use any other method because supabase can't set session data to chrome.storage.local
Even tho, I explicitly refreshSession on my background script, it returns the new session but doesn't add anywhere. So it disappears in the first browser refresh. How do you keep the extension session live inside your background script? I ask this because there is no info for cross-tab session management inside extensions anywhere in the internet :)
Just because I don't have valid session stored anywhere in my background script, I can't use RLS with supabase-js. Also just because I can't use RLS I can't share my anon_key. Any ideas/opinions on this?