Hi Team,
Maybe this is an old question, but I am trying the
webRequest.onAuthRequired API in MV3 recently. My question is can I achieve both of the two goals
- provide a `BlockingResponse` in a promised callback to authenticate the user
- take no action in some other cases
for example
```
chrome.webRequest.onAuthRequired.addListener(details => {
return new Promise(resolve => {
if(some conditional checking) {
// provide creds to authenticate
resolve({authCredentials: myCredentials});
} else {
// take no actions
resolve();
}
})
}, {urls: ["<all_urls>"]}, ["asyncBlocking"])
```
But according to my tests
- if we want to return `BlockingResponse`, we need to use `asyncBlocking`
- if we use `asyncBlocking`, seems we must provide credentials or cancel or redirect, I would like to take no actions, but if I resolve the promise with undefined, the request seems still blocked
Is there any solutions or suggestions?
Thanks a lot!