Countersign
Ask for a countersignature
/countersign/bc-authorize Ask the signed-in person to countersign one action before your app carries it out. Call it from your server when the change comes in, and store auth_req_id and txn_hash with the pending change. The request follows OpenID CIBA poll mode, with the action in RFC 9396 authorization_details.
Authentication
Your app's own client authentication, exactly as at POST /oauth2/token: its client ID and secret with HTTP Basic or in the
body, or a private_key_jwt assertion. A public client can't call it.
Body application/x-www-form-urlencoded
-
login_hintstring requiredThe
subyour app received for the person when they signed in. -
authorization_detailsstring requiredThe action, as a JSON array of entries (RFC 9396): each a
type, an optionalsummary,fieldsofname,title,valueand optionalformat, and an optionalnotice. Up to 32 KB. -
binding_messagestringUp to 140 characters. The headline when no entry has a
summary. -
frame_originstring requiredThe origin of the page that opens the Trustaige window, which must be the origin of one of the app's redirect URIs. Send it always: the admin can change the app's method at any time, and an app set to Phone ignores it.
-
noncestringEchoed in the proof.
Responses
- 200 The person is being asked. For Passkey, open
frame_urlon your page; for Phone, showbinding_code.Show response fields
-
auth_req_idstring requiredThe request. Collect its proof with it, and check it against the proof's
jti. -
expires_ininteger requiredSeconds until the request ends: 300 for Passkey, 180 for Phone.
-
intervalinteger requiredSeconds to wait between polls of
POST /countersign/token. -
methodstring requiredHow the person countersigns, as the organization's admin set it for the app.
One of
same_device_passkey,phone_approval -
frame_urlstringPasskey only. Hand it to
TrustaigeCountersign.openfrom/countersign.js. -
binding_codestringPhone only. Show it beside your own "Approve on your phone"; the person picks the same code on their phone.
-
txn_hashstring requiredThe value the proof's
txn_hashwill carry. Store it with the pending change.
-
- 400 The request can't be asked.
- 401 Your app didn't authenticate as a confidential client.
- 429 This person has been asked on their phone too often.
Errors
Errors come back as an error to branch on. What each means and what to do:
| Status | Code | What to do |
|---|---|---|
| 401 | invalid_client | Authenticate as the app, with its secret or key. A public client can't ask. |
| 400 | unauthorized_client | Countersign is off for the app, or the app isn't one the organization runs itself. An admin turns it on in the app's Countersign tab. |
| 400 | unknown_user_id | login_hint isn't the sub of someone with access to the app's organization. |
| 400 | invalid_authorization_details | The action isn't in the shape Countersign shows. error_description names the entry and field. |
| 400 | invalid_binding_message | binding_message is longer than 140 characters. |
| 400 | invalid_request | frame_origin isn't the origin of one of the app's redirect URIs. |
| 400 | phone_approval_unavailable | The app is set to Phone, and the person hasn't set up Trustaige Identity, or Phone isn't available to the organization. Trustaige never switches to the passkey instead. |
| 400 | access_denied | The person recently reported a request as not theirs, so requests to them are paused for a few minutes. |
| 429 | rate_limited | Phone requests to one person are limited to 10 in 10 minutes. |