- Notifications
You must be signed in to change notification settings - Fork909
Commit95347b2
authored
fix: allow orgs with default github provider (#16755)
This PR fixes 2 bugs:## Problem 1The server would fail to start when the default github provider wasconfigured and the flag `--oauth2-github-allowed-orgs` was set. Theerror was```error: configure github oauth2: allow everyone and allowed orgs cannot be used together```This PR fixes it by enabling "allow everone" with the default provideronly if "allowed orgs" isn't set.## Problem 2The default github provider uses the device flow to authorize users, andthat's handled differently by our web UI than the standard oauth flow.In particular, the web UI only handles JSON responses rather than HTTPredirects. There were 2 code paths that returned redirects, and the PRchanges them to return JSON messages instead if the device flow isconfigured.1 parentb85ba58 commit95347b2
3 files changed
+35
-4
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1911 | 1911 |
| |
1912 | 1912 |
| |
1913 | 1913 |
| |
1914 |
| - | |
1915 | 1914 |
| |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
1916 | 1918 |
| |
1917 | 1919 |
| |
1918 | 1920 |
| |
|
Lines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
314 | 314 |
| |
315 | 315 |
| |
316 | 316 |
| |
| 317 | + | |
317 | 318 |
| |
318 | 319 |
| |
319 | 320 |
| |
| |||
355 | 356 |
| |
356 | 357 |
| |
357 | 358 |
| |
358 |
| - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
359 | 362 |
| |
360 | 363 |
| |
361 | 364 |
| |
| |||
439 | 442 |
| |
440 | 443 |
| |
441 | 444 |
| |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
442 | 451 |
| |
443 | 452 |
| |
444 | 453 |
| |
|
Lines changed: 22 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
922 | 922 |
| |
923 | 923 |
| |
924 | 924 |
| |
925 |
| - | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
926 | 936 |
| |
927 | 937 |
| |
928 | 938 |
| |
| |||
959 | 969 |
| |
960 | 970 |
| |
961 | 971 |
| |
962 |
| - | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
963 | 983 |
| |
964 | 984 |
| |
965 | 985 |
| |
|
0 commit comments
Comments
(0)