How do I log out of a chrome.identity oauth provider

I am not aware about the specific third party provider. But I faced the similar problem when using Google Oauth with chrome.identity.launchWebAuthFlow(). I could sign in the user, but not sign out using removeCachedAuthToken()

In this case, to logout the user, I used chrome.identity.launchWebAuthFlow() with Google’s logout URL rather than it’s oauth URL

chrome.identity.launchWebAuthFlow(
    { 'url': 'https://accounts.google.com/logout' },
    function(tokenUrl) {
        responseCallback();
    }
);

This worked pretty well.

Leave a Comment