Commit 7da602c
fix: have login attempt to use browser and fallback to ticket instead of forcing tickets (#8167)
Try browser-based auth first in non-interactive environments before
falling back to the agent copy/paste flow. Previously, non-interactive
sessions (CI, piped input, etc.) skipped the browser entirely and went
straight to the ticket/URL output. Now we attempt to open the browser
and only fall back to the agent-friendly flow if it fails.
This should help agents that allow a graceful timeout situation to have
a good experience
<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve and how?
-->
---
For us to review and ship your PR efficiently, please perform the
following steps:
- [ ] Open a
[bug/issue](https://github.com/netlify/cli/issues/new/choose) before
writing your code 🧑💻. This ensures we can discuss the changes and get
feedback from everyone that should be involved. If you\`re fixing a typo
or something that\`s on fire 🔥 (e.g. incident related), you can skip
this step.
- [ ] Read the [contribution guidelines](../CONTRIBUTING.md) 📖. This
ensures your code follows our style guide and
passes our tests.
- [ ] Update or add tests (if any source code was changed or added) 🧪
- [ ] Update or add documentation (if features were changed or added) 📝
- [ ] Make sure the status checks below are successful ✅
**A picture of a cute animal (not mandatory, but encouraged)**
---------
Co-authored-by: Sean Roberts <sean.roberts@netlify.com>1 parent 8976f0b commit 7da602c
File tree
3 files changed
+26
-11
lines changed- src
- commands
- login
- utils
3 files changed
+26
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
516 | 517 | | |
517 | 518 | | |
518 | 519 | | |
519 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
520 | 540 | | |
521 | 541 | | |
522 | 542 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 53 | | |
61 | 54 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
0 commit comments