Again, what stops malicious app B from just taking the A's id and presenting it to device ? token doesn't know who sent USB packet
If you're asking about applications running on the device (Tillitis Key) the answer is measured boot. You can read more on tillitis.se.