-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Persistent Authentication #746
Comments
Preface: I am restricting the discussion to proxy, because regular network requests can already receive authentication details through DNR, via #264 (comment). If the discussion should apply more broadly, please clarify. In today's meeting (#750) I mentioned Chrome's It sounds like a declarative proxy setting, or even a flag to remember the authentication for a certain amount of time (or until an error or explicit invalidation), potentially restricted to a specific |
The issue is "How to provide proxy authentication when the background script is unloaded" (in MV3).
Indeed, the request is centred around Proxy authentication.
It would be useful and match the Firefox proxy.onRequest API method of providing authentication. However, there is a major difference.
Please note that the authentication is not limited to a single credential for a single requester. Multiple authentications for multiple proxies may need to be provided simultaneously. Furthermore, different credentials may be needed for the same requester which would make caching it by the browser impractical. Currently, the only caching option is the rule-based caching. DNR was suggested as the rules will stay in force even when background script/service-worker is unloaded. |
Proposal: Persistent Authentication
Background
Extensions use
webRequest.onAuthRequired.addListener
in the background script to provide authentication. In MV3, when the background script is unloaded, restarting it, retrieving the necessary data asynchronously from thestorage
, and processing the data, can take up some time, which results in the unwanted authentication popup from the browser.Ideally, a persistent method to provide the authentication data is needed.
Some APIs such as Menus and Scripting already support persistent data.
Proposal
Create a method to provide persistent authentication data
Suggestions
1. Persistent onAuthRequired
Make the listener and its data persistent
2. declarativeNetRequest
Adapt DNR to provide persistent authorisation data
The rule-based DNR approach (versus an event-based one) might prove to be more efficient in the long run and eliminate the need for a
webRequest.onAuthRequired.addListener
.See also:
The text was updated successfully, but these errors were encountered: