javascript - Sign google Oauth with defference account in chrome extension? -
i'm using api chrome.identity develop oauth login.i have problem when i'm remove token key in cache chrome.when i'm login first time , logout out account,it's still using old token key i'm login in first time can not login google's account.event if clear cache browser,it still problem first account.
ex :when google oauth ask login i'm using account , logout account a.and i'm click button login google oauth still using account a,so can not login account b.(only i'm uninstall chrome , install new chrome , can login account). code remove google token key.how can fix it.
function removetoken() { chrome.identity.getauthtoken({ 'interactive': false }, function (current_token) { if (!chrome.runtime.lasterror) { gtoken = current_token; if (!chrome.runtime.lasterror) { chrome.identity.removecachedauthtoken({ token: current_token }, function () { }); var xhr = new xmlhttprequest(); xhr.open('get', 'https://accounts.google.com/o/oauth2/revoke?token=' + gtoken); xhr.send(); } } }); }
chrome identity uses login account chrome account, not 1 used log web page. use account use separate chrome account
Comments
Post a Comment