Callback not called for chrome.identity.getAuthToken for self hosted chrome extension
问题 I am developing a self hosted chrome extension and have generated the key and client_id as described here. My call to getAuthToken is (copied from the answer to this question) chrome.identity.getAuthToken({ interactive: true }, function(token) { if (chrome.runtime.lastError) { alert(chrome.runtime.lastError.message); return; } var x = new XMLHttpRequest(); x.open('GET', 'https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=' + token); x.onload = function() { alert(x.response);