最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Firebase authentication with popup in chrome extension - Stack Overflow

programmeradmin0浏览0评论

I'm trying to authenticate users via Firebase in a Chrome extension using Firebase Authentication. I want to use a popup to authenticate with Google and GitHub, but the popup isn't displaying. According to the documentation, I need to add the following URLs to the content_security_policy:

However, I've added these URLs and still encounter CSP (Content Security Policy) errors. Any suggestions on how to resolve this issue?

Manifest.json:

{
  "manifest_version": 3,
  "name": "Name",
  "version": "1.0.0",
  "description": "XXX",
  "author": "ISSS",
  "permissions": [
    "tabs",
    "activeTab",
    "offscreen"
  ],
  "host_permissions": [
    "https://*.googleapis/*",
    "https://*.firebaseapp/*",
    "https://*.firebase.google/*"
  ],
  "chrome_url_overrides": {
    "newtab": "index.html"
  },
  "action": {
    "default_icon": {
      "16": "icons/icon16.png",
      "32": "icons/icon32.png",
      "48": "icons/icon48.png",
      "128": "icons/icon128.png"
    }
  },
  "background": {
    "service_worker": "assets/background-DnhXaGSS.js",
    "type": "module"
  },
  "content_security_policy": {
    "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'; connect-src 'self' https://*.firebaseapp https://*.googleapis wss://*.firebaseio   https://*.google"
  }
}
发布评论

评论列表(0)

  1. 暂无评论