Home / Function/ IntegrationTypeContent() — supabase Function Reference

IntegrationTypeContent() — supabase Function Reference

Architecture documentation for the IntegrationTypeContent() function in IntegrationCard.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/IntegrationCard.tsx lines 105–175

export const IntegrationTypeContent = ({
  type,
  integration,
}: {
  type: INTEGRATION_TYPES
  integration: ThirdPartyAuthIntegration
}) => {
  switch (type) {
    case 'firebase': {
      const projectName =
        integration.oidc_issuer_url?.replace('https://securetoken.google.com/', '') || ''

      return (
        <div className="text-sm flex flex-row gap-x-4">
          <span className="text-foreground-light w-36">Firebase Project ID</span>
          <span className="text-foreground">{projectName}</span>
        </div>
      )
    }
    case 'auth0':
      const domainName =
        integration.oidc_issuer_url?.replace('https://', '').replace('.auth0.com', '') || ''

      return (
        <div className="text-sm flex flex-row gap-x-4">
          <span className="text-foreground-light w-36">Auth0 Domain Name</span>
          <span className="text-foreground">{domainName}</span>
        </div>
      )
    case 'awsCognito': {
      const region =
        integration.oidc_issuer_url?.split('.').filter((s) => AWS_IDP_REGIONS.includes(s))[0] || ''

      const userPoolId =
        integration.oidc_issuer_url?.split('/').filter((s) => s.startsWith(region || ''))[0] || ''

      return (
        <div className="text-sm flex flex-col gap-y-2">
          <div className="flex flex-row gap-x-4">
            <span className="text-foreground-light w-36">Region</span>
            <span className="text-foreground">{region}</span>
          </div>
          <div className="flex flex-row gap-x-4">
            <span className="text-foreground-light w-36">User Pool ID</span>
            <span className="text-foreground">{userPoolId}</span>
          </div>
        </div>
      )
    }

    case 'clerk':
      return (
        <div className="text-sm flex flex-row gap-x-4">
          <span className="text-foreground-light w-36">Domain</span>
          <span className="text-foreground">{integration?.oidc_issuer_url ?? ''}</span>
        </div>
      )

    case 'workos':
      return (
        <div className="text-sm flex flex-row gap-x-4">
          <span className="text-foreground-light w-36">Issuer URL</span>
          <span className="text-foreground">{integration?.oidc_issuer_url ?? ''}</span>
        </div>
      )

    case 'custom':
    default:
      return <>Custom</>
  }
}

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free