File tree Expand file tree Collapse file tree
apps/sim/ee/sso/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -713,19 +713,26 @@ function OrganizationSsoSettings({ organizationId }: SSOProps) {
713713 inputClassName = { ! showClientSecret ? '[-webkit-text-security:disc]' : undefined }
714714 error = { showErrors && errors . clientSecret . length > 0 }
715715 endAdornment = {
716- < Button
717- type = 'button'
718- variant = 'ghost'
719- onClick = { ( ) => setShowClientSecret ( ( s ) => ! s ) }
720- className = 'size-6 p-0 text-[var(--text-muted)] hover:text-[var(--text-primary)]'
721- aria-label = { showClientSecret ? 'Hide client secret' : 'Show client secret' }
722- >
723- { showClientSecret ? (
724- < EyeOff className = 'size-[14px]' />
725- ) : (
726- < Eye className = 'size-[14px]' />
727- ) }
728- </ Button >
716+ // Only offer the reveal once there is something to reveal. The
717+ // stored secret is never sent to the browser, so on an untouched
718+ // edit the toggle would be a control that visibly does nothing.
719+ formData . clientSecret ? (
720+ < Button
721+ type = 'button'
722+ variant = 'ghost'
723+ onClick = { ( ) => setShowClientSecret ( ( s ) => ! s ) }
724+ className = 'size-6 p-0 text-[var(--text-muted)] hover:text-[var(--text-primary)]'
725+ aria-label = {
726+ showClientSecret ? 'Hide client secret' : 'Show client secret'
727+ }
728+ >
729+ { showClientSecret ? (
730+ < EyeOff className = 'size-[14px]' />
731+ ) : (
732+ < Eye className = 'size-[14px]' />
733+ ) }
734+ </ Button >
735+ ) : undefined
729736 }
730737 />
731738 </ SettingRow >
You can’t perform that action at this time.
0 commit comments