I'm working on a chrome extension and trying to implement an authentication method (firebase). I'm confused by what has to go where, since the popup.html doesn't allow inline script, it makes it a bit more difficult. As far as I see this there are 2 options:
Call external page (hosted by me) from the extension, open in new tab, handle login there. But in this case, how does the extension communicate with the login page? Cookies? I need the confirmation inside my popup.js
Try to handle Email/Password login in Chrome extension popup, which seems more complicated. I always violate the Content Security Policy, bit annoying. I tried this already, problem is once you close the popup, it looses the login state.
I researched already a lot, but there is no real good example so far, and other questions are barely answered. Thanks!