appsInTossSignTossCert
Sign with the Toss Cert certificate to perform identity verification, simple authentication, or electronic signature. Pass the txId (Transaction ID) issued by your server — the SDK presents the cert-selection and signing UI. The Promise resolves when signing is complete.
Signature
import { appsInTossSignTossCert } from '@apps-in-toss/web-framework';
interface AppsInTossSignTossCertParams {
txId: string;
}
declare function appsInTossSignTossCert(
params: AppsInTossSignTossCertParams
): Promise<void>;
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
params | AppsInTossSignTossCertParams | ✓ | Parameter object for signing. |
params.txId | string | ✓ | Transaction ID issued by your server for this signing session. |
Returns
Promise<void>— resolves when signing completes successfully.- Rejects if the user cancels or an error occurs — wrap in
try/catch.
Permission
No permission required — appsInTossSignTossCert is not bound to any PermissionName. For how other namespaces handle permissions, see Guides — Permissions pattern.
Requires
appLogin firstappsInTossSignTossCert assumes the user is already logged in. Calling it without a completed login session may cause the flow to fail. Always call appLogin first.
Examples
Minimal
import { appsInTossSignTossCert } from '@apps-in-toss/web-framework';
async function handleSign(txId: string) {
await appsInTossSignTossCert({ txId });
console.log('Signing complete.');
}
Realistic — login then sign
import { appLogin, appsInTossSignTossCert } from '@apps-in-toss/web-framework';
import { useState } from 'react';
// Replace `fetchTxId` with your actual server API.
declare function fetchTxId(): Promise<string>;
function SignButton() {
const [status, setStatus] = useState<string | null>(null);
const handleClick = async () => {
try {
// 1. Log in
const { authorizationCode, referrer } = await appLogin();
console.log('Login complete:', { authorizationCode, referrer });
// 2. Obtain a txId from your server
const txId = await fetchTxId();
// 3. Sign with Toss Cert
await appsInTossSignTossCert({ txId });
setStatus('Signing complete.');
} catch (error) {
setStatus('Signing failed — please try again.');
console.error(error);
}
};
return (
<>
<button type="button" onClick={handleClick}>
Sign with Toss Cert
</button>
{status && <p>{status}</p>}
</>
);
}
Try it live
Run the appsInTossSignTossCert card on the Auth page in sdk-example.
Related APIs
appLogin— Start the Toss login flow. Must be completed before callingappsInTossSignTossCert.getIsTossLoginIntegratedService— Check whether the user has integrated Toss login.
Related guides
- Guides — Toss login flow — end-to-end flow from appLogin through server-side token exchange.
- Guides — Permissions pattern — Permission handling in other namespaces (for reference;
appsInTossSignTossCertrequires no permission).
External references
@apps-in-toss/web-framework— SDK package. The actual exports are re-exported from@apps-in-toss/web-bridge.