google-oauth

How to revoke Google account access from within an extension

好久不见. 提交于 2020-12-09 18:39:35
问题 I have a Chrome browser extension that requests access using chrome.identity.getAuthToken, and is working as expected. In the extension you can logout using: var do_logout = function() { chrome.identity.getAuthToken({'interactive': false}, function(token) { chrome.identity.removeCachedAuthToken({token:token}, function(){ display_login(); }); }); }; Which again is working fine. The issue is when you log back in. Ideally I want the extension to ask for permission again - mainly for testing from