-
Notifications
You must be signed in to change notification settings - Fork 16.5k
feat: support app#login event for utility process net requests #42631
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
Conversation
d84a9ce
to
c6ab261
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
c6ab261
to
143b6d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
449c1d8
to
26eb0ab
Compare
Failing test is unrelated, merging. |
Release Notes Persisted
|
I was unable to backport this PR to "30-x-y" cleanly; |
I was unable to backport this PR to "31-x-y" cleanly; |
I was unable to backport this PR to "32-x-y" cleanly; |
Thanks @jkleinsc for rebasing the PR |
@deepak1556 has manually backported this PR to "32-x-y", please check out #43317 |
…ron#42631) * feat: support app#login event for utility process net requests * chore: address review feedback * GlobalRequestID: Avoid unwanted inlining and narrowing int conversions Refs https://chromium-review.googlesource.com/c/chromium/src/+/5702737
Description of Change
With net module support to utility process added via #40017, it is currently not straightforward to handle basic auth. Apps would need to have some sort of boilerplate code from utility process to allow the main process trigger an interactive UI for obtaining the credentials. However, we already have logic obtained from Chromium to support basic auth requests from renderers or service workers via the
app.on('login', ...)
event. It would be simpler if apps can opt-in to the same event for requests from utility process as well, this is now possible via a new propertyrespondToAuthRequestsFromMainProcess
on theutilityProcess.fork
api.Refs microsoft/vscode#212949
Release Notes
Notes: Add support for responding to auth requests initiated from utility process via
app#login
event