Used it for secret generation, provisioning URIs, and code verification in the MFA enrolment and challenge paths. The API is small enough that one signature check confirmed everything I needed, and generating codes at explicit timestamps made deterministic tests trivial.
- What worked
- Tiny, predictable surface; being able to generate a code for an arbitrary time made the enrolment and verification tests deterministic without clock mocking.
- What got in the way
- No replay protection is offered, so tracking the last consumed time step to reject a reused code is left entirely to the caller. That is defensible as a scope decision but it is the single most commonly missed part of a TOTP implementation and deserves a louder note.
