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 ?