Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!