demo · v141
Badge Kiosk
The explainer's second canonical use case: a check-in kiosk reads an employee's RFID badge via PC/SC and personalises the screen. The kiosk is a ChromeOS device locked to a single IWA — perfect target for the Smart Card API. Tap a badge, the kiosk SELECTs the application on the card, reads the employee ID, displays welcome.
Simulated kiosk panel — click "scan badge" to walk through the card-reader handshake:
the call (kiosk side)
const ctx = await navigator.smartCard.createContext();
const readers = await ctx.listReaders();
const rdr = readers.find((r) => r.includes("ContactlessReader")) || readers[0];
const conn = await ctx.connect(rdr, "shared");
// SELECT the badge applet (corporate AID)
const select = new Uint8Array([0x00, 0xA4, 0x04, 0x00, 0x07, 0xA0, 0x00, 0x00, 0x03, 0x08, 0x00, 0x00]);
const selResp = await conn.transmit(select);
if (selResp[selResp.length - 2] !== 0x90) throw new Error("badge applet not found");
// READ BINARY — employee ID lives at EF 0x0001
const read = new Uint8Array([0x00, 0xB0, 0x00, 0x01, 0x10]);
const data = await conn.transmit(read);
const employeeId = new TextDecoder().decode(data.slice(0, -2)).trim();
showWelcome(employeeId);
why this angle
The explainer specifically calls out kiosk reception desks, badge-reading lobby displays, and PC/SC-controlled visitor sign-in. These were built historically on Chrome Apps with the deprecated chrome.usb / chrome.hid APIs — the WICG API is the IWA-era successor. The badge-kiosk pattern is the simpler complement to the remote-desktop relay: short-lived contactless reads instead of long-lived APDU forwarding.