Revoke access to a Google account from an internal domain

I have a Chrome browser extension that requests access using chrome.identity.getAuthToken and works as expected. In an extension, you can log out using:

var do_logout = function() {
    chrome.identity.getAuthToken({'interactive': false}, function(token) {
        chrome.identity.removeCachedAuthToken({token:token}, function(){
            display_login();
        });
    });
};

      

Which works fine again. The problem is when you login. Ideally, I want the extension to ask for permission again - mostly for testing from different accounts - but even when I ask for a login with interactive = true, I don't get an interactive interface like:

chrome.identity.getAuthToken({'interactive': true }, function(token) {

      

I can log into my Google Accounts page and revoke access from there, but this is a bit of a fuff and it feels cleaner if I want to write out of something that I would have to give permission to log in again.

Is there a way for the extension to revoke its own access to the user account? I would guess so, but I'm on a wall on google. The best I have found is " Revoke Token ", but it looks like there should be a way to do this with chrome.identity or chrome.permissions .

+3


source to share


1 answer


As I know the chrome id is controlled by the Google account signed in the Chrome browser, not the web session for Google. Chrome app names are tied to the Google Account signed in Chrome. You can change your current signed account in Chrome settings , but I recommend that you create a new Chrome profile instead .



+2


source







All Articles