Documentation

Device proof

When the phone holds a hardware key (Secure Enclave / Android Keystore), every approval carries approvalProof: the phone's own ECDSA P-256 signature over the request id, action, number-match code and the exact details it showed. Verify it on your server — you don't have to trust Touchque.

Pin the device: store proof.publicKey from the user's first verified approval and pass it as the expected key. Without a pin the check returns false unless you explicitly allow an unpinned key (trust on first use only).

Python needs the optional extra: touchque-authenticator[proof] (the cryptography package). PHP needs ext-openssl; Node, Go, .NET, Java and Ruby use their standard library.

In your webhook / after a status check
const { verifyApprovalProof } = require('@touchque/node');

const ok = verifyApprovalProof(event.approvalProof, {
  requestId, type: 'WITHDRAW', details, challengeCode,
  expectedPublicKey: user.touchqueDeviceKey, // stored from their first verified approval
});
if (!ok) throw new Error('approval proof does not match');