Basic Proxy Authentication on chrome manifest v3

Viewed 759

I use this method to handle the Proxy-Authorization on chrome manifest v2 but it doesn't work on manifest v3. What should I do in chrome/chromium manifest v3?

chrome.webRequest.onAuthRequired.addListener(function(details, callbackFn) {
        callbackFn({
            authCredentials: { username: username, password: password }
        });
    },{urls: ["<all_urls>"]},['asyncBlocking']);
1 Answers

If it is an option for you, you could use devtools protocol to do this for now. ref: https://chromedevtools.github.io/devtools-protocol/tot/Fetch/#method-continueWithAuth

Fetch can also handle auth in 3rd party iframes, which webRequests cannot. But please keep in mind that you cannot use it in the combination with the declarativeNetRequests.

I also share the opinion that MV3 is still "semi-broken" and it is not able to handle many use-cases that we were able in MV2.

Related