@@ -58,6 +58,8 @@ interface SidebarProps {
5858 setCustomHeaders : ( headers : CustomHeadersType ) => void ;
5959 oauthClientId : string ;
6060 setOauthClientId : ( id : string ) => void ;
61+ oauthClientSecret : string ;
62+ setOauthClientSecret : ( secret : string ) => void ;
6163 oauthScope : string ;
6264 setOauthScope : ( scope : string ) => void ;
6365 onConnect : ( ) => void ;
@@ -87,6 +89,8 @@ const Sidebar = ({
8789 setCustomHeaders,
8890 oauthClientId,
8991 setOauthClientId,
92+ oauthClientSecret,
93+ setOauthClientSecret,
9094 oauthScope,
9195 setOauthScope,
9296 onConnect,
@@ -104,6 +108,7 @@ const Sidebar = ({
104108 const [ showAuthConfig , setShowAuthConfig ] = useState ( false ) ;
105109 const [ showConfig , setShowConfig ] = useState ( false ) ;
106110 const [ shownEnvVars , setShownEnvVars ] = useState < Set < string > > ( new Set ( ) ) ;
111+ const [ showClientSecret , setShowClientSecret ] = useState ( false ) ;
107112 const [ copiedServerEntry , setCopiedServerEntry ] = useState ( false ) ;
108113 const [ copiedServerFile , setCopiedServerFile ] = useState ( false ) ;
109114 const { toast } = useToast ( ) ;
@@ -555,6 +560,38 @@ const Sidebar = ({
555560 data-testid = "oauth-client-id-input"
556561 className = "font-mono"
557562 />
563+ < label className = "text-sm font-medium" >
564+ Client Secret
565+ </ label >
566+ < div className = "flex gap-2" >
567+ < Input
568+ type = { showClientSecret ? "text" : "password" }
569+ placeholder = "Client Secret (optional)"
570+ onChange = { ( e ) => setOauthClientSecret ( e . target . value ) }
571+ value = { oauthClientSecret }
572+ data-testid = "oauth-client-secret-input"
573+ className = "font-mono"
574+ />
575+ < Button
576+ variant = "outline"
577+ size = "icon"
578+ className = "h-9 w-9 p-0 shrink-0"
579+ onClick = { ( ) => setShowClientSecret ( ! showClientSecret ) }
580+ aria-label = {
581+ showClientSecret ? "Hide secret" : "Show secret"
582+ }
583+ aria-pressed = { showClientSecret }
584+ title = {
585+ showClientSecret ? "Hide secret" : "Show secret"
586+ }
587+ >
588+ { showClientSecret ? (
589+ < Eye className = "h-4 w-4" aria-hidden = "true" />
590+ ) : (
591+ < EyeOff className = "h-4 w-4" aria-hidden = "true" />
592+ ) }
593+ </ Button >
594+ </ div >
558595 < label className = "text-sm font-medium" >
559596 Redirect URL
560597 </ label >
0 commit comments