Repository navigation
feat(oauth): add stdio OAuth 2.1 login core library (1/4) #2704
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
Changes from 1 commit
92db283
f707dba
27040d5
64afe52
5da25d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Address code review: - openBrowser: reap the launcher process asynchronously so it does not linger as a zombie for the lifetime of the server. - listenCallback: take an explicit bindAll flag and bind to all interfaces only inside a container (where the published port arrives via eth0). A native run, even with a fixed callback port, now stays on 127.0.0.1 instead of 0.0.0.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,14 @@ func openBrowser(url string) error { | |
|
|
||
| cmd.Stdout = io.Discard | ||
| cmd.Stderr = io.Discard | ||
| return cmd.Start() | ||
| if err := cmd.Start(); err != nil { | ||
| return err | ||
| } | ||
| // The launcher (xdg-open/open/rundll32) exits as soon as it hands off to the | ||
| // browser. Reap it asynchronously so it does not linger as a zombie for the | ||
| // lifetime of this long-running server. | ||
| go func() { _ = cmd.Wait() }() | ||
| return nil | ||
| } | ||
|
Comment on lines
+39
to
+49
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch — fixed in f707dba. |
||
|
|
||
| // isRunningInDocker reports whether the process is running inside a Docker (or | ||
|
|
||
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.
Updated — the test helper now calls
listenCallback(0, false), and I addedTestListenCallbackBindAllForContainerto assert thebindAllpath binds all interfaces.