Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

113
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda