Guide home · Showcase endpoints
The showcase supports pvn_sim for an entered phone and login_sim for obtaining a number. The app shows the configured SIM buttons only when DigitalCredential.userAgentAllowsProtocol("openid4vp-v1-unsigned") returns true; otherwise they remain hidden. The check runs on page load. Completing verification also requires an eligible device and carrier that can provide a TS43 credential. Configure the appropriate client and provider credentials.
- Browser calls
POST /ts43/authwithclient_id,server_id,login_hint,carrier_hint,scope, and optionallyoperation. In the current demo PNV uses the phone andopenid ip:phone_verify; Login usesanonymous,openid ip:phoneandGetPhoneNumber. The demo currently sendscarrier_hint: 51010; do not assume that value is suitable for your deployment. - The showcase calls provider
/ext/ciba/auth, then/ext/bc/ts43/dcql, returningauth_req_id,nonceanddigital_request. - A supported browser receives that request through
navigator.credentials.get. The demo extractsvp_tokenfromcredential.tokenorcredential.dataundervp_token['ipification.com'][0]. - Browser sends the credential and request identifiers to
POST /ts43/token. The backend submits it to provider/ext/bc/ts43/callback, calls/tokenwith the CIBA grant, then calls/userinfo.
// `started` is the successful JSON response from showcase POST /ts43/auth.
if (!navigator.credentials?.get) throw new Error('SIM is unavailable');
const credential = await navigator.credentials.get({
digital: { requests: [started.digital_request] },
});
const data = credential?.token || credential?.data;
const vpToken = data?.vp_token?.['ipification.com']?.[0];
if (!vpToken) throw new Error('No supported SIM credential');
const response = await fetch('/ts43/token', {
method: 'POST', headers: { 'Content-Type': 'application/json' },
credentials: 'same-origin',
body: JSON.stringify({
vp_token: vpToken, auth_req_id: started.auth_req_id, nonce: started.nonce,
client_id: '<configured-client-id>', server_id: 'stage',
}),
});
if (!response.ok) throw new Error('SIM verification failed');
const userInfo = await response.json();/ts43/auth is rate limited and may return 429 with Retry-After. Handle unavailable/cancelled credentials, provider errors and expired attempts. The demo submits the callback best-effort before token exchange; its display session can hold error data, so do not equate session existence with verification success. The demo currently navigates to its result page even if /ts43/token returned an error; integrations should check the response explicitly, as above. /ts43/log is retained for compatibility. The browser flow no longer sends token responses to it.
See SIM browser flow, CIBA handler, and provider requests.