How to use firebase authentication inside content scripts?

Hi, have successfully setup firebase auth and it is working with popup.tsx. However, when I try to access the user details inside the content section - I am unable to get the user details. I am using import { useFirebase } from "~firebase/hook"; to get the user variable. It always returns the usre value as null
1 Reply
tetec1
tetec1•2y ago
My solution to that was to use Plasmo's storage API to save some properties of the user object (like the token) in storage, and read it from the content script. You can also use messages, but I found that to be more difficult to deal with.
Want results from more Discord servers?
Add your server