Chrome Version: Version 56.0.2924.87 (64-bit & 32-bit too)
OS: Win7 & Win10
What steps will reproduce the problem?
(1) Load an extension with the code below
(2) Click on the browser action button
(3) Witness the signin tab
What is the expected result?
The current Chrome signin state should be used, and no tab should be opened to sign in.
What happens instead?
The signin tab is opened, always, and even after signing in, the callback receiving the token is never called.
background.js:
========================
chrome.browserAction.onClicked.addListener(function (Tab) {
console.log("clicked");
chrome.identity.getAuthToken({ 'interactive': true }, function(token) {
console.log(token);
});
});
========================
manifest.json
========================
{
"name": "Identity bug repro",
"version": "0.1",
"description": "To test a potential identity bug",
"permissions": [
"identity"
],
"browser_action": {
"name": "Identity test",
"default_title": "Identity"
},
"background": {
"page": "background.html",
"persistent": true
},
"oauth2": {
"client_id": <clientId>,
"scopes": ["https://www.googleapis.com/auth/drive"]
},
"manifest_version": 2
}
========================
To add to the weirdness, the extension I'm working on that use this functionality, is currently installed on my laptop and works fine. But when I try to install it again, it doesn't anymore... Even if I refresh the working extension it keeps working, but when I try to install it again (exact same code, on same or different profile/machine) it doesn't work... The newly installed extension behaves as described above, whereas the one that I installed a few days ago, works correctly... Really weird...
Comment 1 by msarda@chromium.org
, Feb 24 2017