@@ -11,6 +11,7 @@ import {
1111} from '@trycompai/design-system/icons' ;
1212import Image from 'next/image' ;
1313import { useState } from 'react' ;
14+ import { View , ViewOff } from '@trycompai/design-system/icons' ;
1415
1516interface AdditionalOAuthSetting {
1617 id : string ;
@@ -38,6 +39,8 @@ export interface Integration {
3839 credentialUpdatedAt ?: string ;
3940 clientIdHint ?: string ;
4041 clientSecretHint ?: string ;
42+ decryptedClientId ?: string ;
43+ decryptedClientSecret ?: string ;
4144 existingCustomSettings ?: Record < string , unknown > ;
4245 setupInstructions ?: string ;
4346 createAppUrl ?: string ;
@@ -152,6 +155,13 @@ export function IntegrationCard({
152155 ) }
153156 </ div >
154157
158+ { integration . hasCredentials && integration . decryptedClientId && (
159+ < CardCredentialsSummary
160+ clientId = { integration . decryptedClientId }
161+ clientSecret = { integration . decryptedClientSecret }
162+ />
163+ ) }
164+
155165 { integration . authType === 'oauth2' && (
156166 < OAuthConfig
157167 integration = { integration }
@@ -355,6 +365,42 @@ function OAuthConfig({
355365 ) ;
356366}
357367
368+ function CardCredentialsSummary ( {
369+ clientId,
370+ clientSecret,
371+ } : {
372+ clientId : string ;
373+ clientSecret ?: string ;
374+ } ) {
375+ const [ showSecret , setShowSecret ] = useState ( false ) ;
376+
377+ return (
378+ < div className = "space-y-1.5 rounded-lg bg-muted p-3" >
379+ < div className = "flex items-center gap-2" >
380+ < span className = "w-16 shrink-0 text-xs text-muted-foreground" > Client ID</ span >
381+ < code className = "min-w-0 truncate rounded border bg-background px-2 py-0.5 text-xs select-all" >
382+ { clientId }
383+ </ code >
384+ </ div >
385+ { clientSecret && (
386+ < div className = "flex items-center gap-2" >
387+ < span className = "w-16 shrink-0 text-xs text-muted-foreground" > Secret</ span >
388+ < code className = "min-w-0 truncate rounded border bg-background px-2 py-0.5 text-xs select-all" >
389+ { showSecret ? clientSecret : `${ '•' . repeat ( Math . min ( clientSecret . length , 20 ) ) } ${ clientSecret . slice ( - 4 ) } ` }
390+ </ code >
391+ < button
392+ type = "button"
393+ className = "shrink-0 text-muted-foreground hover:text-foreground"
394+ onClick = { ( ) => setShowSecret ( ! showSecret ) }
395+ >
396+ { showSecret ? < ViewOff size = { 14 } /> : < View size = { 14 } /> }
397+ </ button >
398+ </ div >
399+ ) }
400+ </ div >
401+ ) ;
402+ }
403+
358404function CredentialsDisplay ( {
359405 clientIdHint,
360406 clientSecretHint,
0 commit comments