Generate a one-time code, hand it to whoever is provisioning the device, and they paste it
into the device's captive portal alongside the device name. The device uses
c2RegisterWithCode instead of the open-enrollment
c2Register endpoint. Codes are single-use and expire.
HEX-PAIR-XK7A2P appears with a 30-minute expiration.HexworthDevice-XXXX./c2RegisterWithCode. Backend validates the code transactionally (lookup + mark-used + mint device credentials in one Firestore transaction).deviceId + deviceKey, code is marked consumed, device appears in the C2 Dashboard.The /c2Register endpoint accepts any POST. Anyone on the public internet who can reach the URL can mint a deviceKey. That's fine for a training-tool demo but unsafe for a real fleet. Pairing codes close that gap by requiring admin involvement before a device can register.
The legacy /c2Register endpoint still works — the c2-device firmware already in the wild keeps registering normally. New firmware should prefer /c2RegisterWithCode. Deprecation of the open endpoint is a future hardening step.
Codes are single-use and short-lived (default 30 min). A leaked code can claim one device. After that, it's dead. Reduce the TTL further if your provisioning workflow runs faster than 30 min.
| Code | Issued to | Label | Created | Status | Expires / Used by |
|---|---|---|---|---|---|
| Loading… | |||||