No Response from sendToBackground()
Hi there, plasmo noob here. Trying to call a firebase function on the click of a button from a content-script. Read docs on using the messaging api with a background worker. Think I set it all up correctly but not getting any response at all from the sendToBackground() method. Here's some snippets.
Again, I don't see any logs, when I execute this. Any ideas what I messed up?
5 Replies
So I figured this one out, turns out generate needed to be in a messages folder.
But now having an issue accessing the currently logged in user (in the popup) from the background worker. I assume it must be possible to authenticate requests in a background worker so hoping to find out what I need to do to accomplish that
you will need to send the JWT (or whatever auth token you can get from popups to bgsw), which can then be used as an access token to invoke the server
@louis I was able to find another message where you said the same thing haha, thanks for the help!
@Sleigh has reached level 1. GG!
Gave +1 Rep to @louis