I am developing a Chrome Extension usng manifest V3, and using a line similar to the following to get an AuthToken for accessing some Google APIs.
chrome.identity.getAuthToken({'interactive': true}, (token,scopes) => {console.log("token is: ", token,scopes);});
The code works fine and shows a dialog enabling me to sign in (or just returns the token if there is one cached). I can then make successful API calls using the token. However if I then go to the Google account page for the authorized user, and revoke the token from there, the next time (and every subsequent time) the call doesn't generate an error (runtime.lastError is undefined) but the callback doesn't get called. I remove the token when and API error occures using chrome.identity.removeCachedAuthToken({ token: accessToken}); but this doesn't help (even though the token shows as being removed in chrome://identity-internals.
Restarting Chrome doesn't work either. The only way I can get the code to work again is by deleting and re-creating the chrome profile in which the extension is installed which obviously isn't a valid solutions for the extension users.
Any help would be appreciated!