Thanks Ákos Kőműves for the clean and easy to follow post explaining how to use Supabase, appreciate it! 🙏🏼
Hi Ákos, thanks for posting this guide!
I wanted to check out the repo directly, but I'm getting a 404 error - can you please share an updated link?
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?
Supabase is what I want to get soon, the article will help a lot, thanks for sharing this. Looking forward to learn from it.
Alex Smotritsky
I think deep thoughts
You mentioned a possible CRUD tutorial. I'm trying to do CRUD against supabase from my browser extension so if you could put out such a tutorial that would be great. I just put the supabase client import at the top of my popup.js file and got an error. Apparently my popup.js file is not a module and I can't put an import at the top of it. D'oh!