Repository navigation
Commit 5dc4aa8
committed
mcp: allow saving oauth2 source before sign-in, defer per-user auth
Selecting the OAuth auth method when adding an MCP source no longer
forces the admin to complete the authorization flow before Save. The
source is persisted with `{kind: "oauth2", connectionId}` pointing at
the stable `mcp-oauth2-${namespace}` id, and each user later mints
their own backing connection via McpSignInButton on the source detail
page (per-scope shadowing resolves tokens per-user at invoke time).
On the plugin side, remote addSource now captures resolver failures
(e.g. no connection minted yet, missing header secret) the same way it
already handles discovery failures: the source row still lands in the
catalog so it shows up in the list and exposes a Sign-in affordance,
while the underlying error still surfaces to the caller for logging.
Stdio behaviour is unchanged — a stdio resolver failure is a config
error the admin must fix first.1 parent e9fad47 commit 5dc4aa8
3 files changed
Lines changed: 56 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
384 | 388 | | |
385 | 389 | | |
386 | | - | |
| 390 | + | |
387 | 391 | | |
388 | 392 | | |
389 | 393 | | |
| |||
493 | 497 | | |
494 | 498 | | |
495 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
496 | 511 | | |
497 | 512 | | |
498 | 513 | | |
| |||
501 | 516 | | |
502 | 517 | | |
503 | 518 | | |
504 | | - | |
| 519 | + | |
505 | 520 | | |
506 | 521 | | |
507 | | - | |
| 522 | + | |
508 | 523 | | |
509 | 524 | | |
510 | 525 | | |
| |||
788 | 803 | | |
789 | 804 | | |
790 | 805 | | |
791 | | - | |
792 | | - | |
793 | | - | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
794 | 815 | | |
795 | 816 | | |
796 | 817 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
654 | | - | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
655 | 662 | | |
656 | 663 | | |
657 | 664 | | |
| |||
660 | 667 | | |
661 | 668 | | |
662 | 669 | | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
677 | 690 | | |
678 | 691 | | |
679 | 692 | | |
| |||
0 commit comments