mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
feat: MCP OAuth flow improvements (#123)
Rewrite OAuth flow handle authentication entirely in web app with secure proxy - Add MCP OAuth proxy with origin validation and callback handling - Remove auto OAuth method from authentication flow - Fix TypeScript build errors - Add directory support for MCP OAuth flows and improve config manager UI - Reload session caches after MCP connection changes
This commit is contained in:
1 parent
7824d52fb8
commit
3f9c398b31
31 files changed
+1054
-483
No files matched your search
@@ -179,14 +179,14 @@ export function AddMcpServerDialog({ open, onOpenChange, onUpdate }: AddMcpServe
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={handleClose}>
|
||||
<DialogContent className="max-w-3xl max-h-[90vh] sm:max-h-[85vh] gap-0 flex flex-col p-0 md:p-6 z-[200]" overlayClassName="z-[200]">
|
||||
<DialogContent className="max-w-3xl max-h-[90vh] sm:max-h-[85vh] gap-0 flex flex-col p-0 md:p-6">
|
||||
<DialogHeader className="p-4 sm:p-6 border-b flex flex-row items-center justify-between space-y-0">
|
||||
<DialogTitle>Add MCP Server</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="flex-1 overflow-y-auto p-2 sm:p-4">
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="serverId">Server ID</Label>
|
||||
<Input
|
||||
id="serverId"
|
||||
@@ -200,7 +200,7 @@ export function AddMcpServerDialog({ open, onOpenChange, onUpdate }: AddMcpServe
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="serverType">Server Type</Label>
|
||||
<Select value={serverType} onValueChange={(value: 'local' | 'remote') => setServerType(value)}>
|
||||
<SelectTrigger className="bg-background border-border">
|
||||
@@ -214,7 +214,7 @@ export function AddMcpServerDialog({ open, onOpenChange, onUpdate }: AddMcpServe
|
||||
</div>
|
||||
|
||||
{serverType === 'local' ? (
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="command">Command</Label>
|
||||
<Input
|
||||
id="command"
|
||||
@@ -228,7 +228,7 @@ export function AddMcpServerDialog({ open, onOpenChange, onUpdate }: AddMcpServe
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="url">Server URL</Label>
|
||||
<Input
|
||||
id="url"
|
||||
@@ -258,7 +258,7 @@ export function AddMcpServerDialog({ open, onOpenChange, onUpdate }: AddMcpServe
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Leave fields blank to use the server's default OAuth discovery
|
||||
</p>
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="oauthClientId">Client ID</Label>
|
||||
<Input
|
||||
id="oauthClientId"
|
||||
@@ -268,7 +268,7 @@ export function AddMcpServerDialog({ open, onOpenChange, onUpdate }: AddMcpServe
|
||||
className="bg-background border-border font-mono"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="oauthClientSecret">Client Secret</Label>
|
||||
<Input
|
||||
id="oauthClientSecret"
|
||||
@@ -279,7 +279,7 @@ export function AddMcpServerDialog({ open, onOpenChange, onUpdate }: AddMcpServe
|
||||
className="bg-background border-border font-mono"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="oauthScope">Scope</Label>
|
||||
<Input
|
||||
id="oauthScope"
|
||||
@@ -295,7 +295,7 @@ export function AddMcpServerDialog({ open, onOpenChange, onUpdate }: AddMcpServe
|
||||
)}
|
||||
|
||||
{serverType === 'local' && (
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<div className="flex items-center justify-between">
|
||||
<Label>Environment Variables</Label>
|
||||
<Button
|
||||
@@ -340,7 +340,7 @@ export function AddMcpServerDialog({ open, onOpenChange, onUpdate }: AddMcpServe
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="timeout">Timeout (ms)</Label>
|
||||
<Input
|
||||
id="timeout"
|
||||
|
||||
Reference in new issue
Block a user