0
content.jsを示していないChrome.identity.getAuthTokenこれはChromeの拡張機能のためのコンテンツページでGoogleユーザーリストに
document.getElementById("signIn").addEventListener("click", function(){
chrome.runtime.sendMessage({task:"switchUser", user: current_user},function(response){
});
});
background.jsこれはChromeの拡張機能のための背景ページで
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse){
if(request.task == "switchUser"){
function getToken(){
chrome.identity.getAuthToken({ interactive: true }, function(token) {
sendResponse(token);
});
}
chrome.identity.removeCachedAuthToken({ token:
currentSessionAccessToken }, getToken);
}
return true;
});
Previous OAuthトークンは正常に削除されましたが、getAuthTokenを使用して新しいトークンを生成すると、ユーザー選択リストは表示されません。しかし、私はインタラクティブに設定しました。私は何が欠けていますか?