Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

112
Vistas
Cannot use prompt() or alert() in the window opened with chrome.identity.launchWebAuthFlow()

I am trying to implement authentication in my Chrome extension. I am using the chrome identity API with chrome.identity.launchWebAuthFlow but the window opened does not display any of my alerts or prompt. Here is my manifest

{
  "manifest_version": 2,
  "name": "MyApp",
  "version": "1.0.0",
  "description": "My cool app",
  "short_name": "MyApp",
  "permissions": [
    "activeTab",
    "declarativeContent",
    "storage",
    "<all_urls>",
    "bookmarks",
    "identity",
    "https://auth.server.com/*"
  ],
  "content_scripts": [
    {
      "matches": [
        "<all_urls>"
      ],
      "css": [
        "style.css"
      ],
      "js": [
        "main.js"
      ]
    }
  ],
  "background": {
    "scripts": [
      "main.js"
    ]
  },
  "browser_action": {
    "default_title": "MyApp",
    "default_popup": "index.html"
  }
}

My js code

function init() {
   alert("Hello World from WebAuthFlow Page");
}

init();

I wonder of the window opened for that purpose restricts the window/browser APIs we have access to ?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda