import { AppErrorCode } from '@documenso/lib/errors/app-error'; import { Button } from '@documenso/ui/primitives/button'; import { Trans } from '@lingui/react/macro'; import { AlertTriangleIcon } from 'lucide-react'; export type CscRecipientBlockedPageProps = { code: string; recipientToken: string; }; /** * Terminal page rendered when the service-scope CSC OAuth callback surfaces a * hard error the recipient can't resolve themselves (empty credential list, * invalid cert, refused algorithm). The blocking-error cookie is read + * cleared by the loader; this page only renders the message + retry CTA. * * The retry link kicks a fresh service-scope OAuth round-trip — useful when * the TSP-side issue is transient (e.g. the recipient's admin has since * provisioned a credential). */ export const CscRecipientBlockedPage = ({ code, recipientToken }: CscRecipientBlockedPageProps) => { const retryUrl = `/api/csc/oauth/authorize?scope=service&token=${encodeURIComponent(recipientToken)}`; return (
{code === AppErrorCode.CSC_CREDENTIAL_LIST_EMPTY ? (