hectorm / otpauth

One Time Password (HOTP/TOTP) library for Node.js, Deno, Bun and browsers.
https://hectorm.github.io/otpauth/
MIT License
971 stars 56 forks source link

How to generate recovery code and suggest totp.generate() type script string type change to number type #478

Closed qcyblm closed 7 months ago

hectorm commented 7 months ago

In the project readme there is an example of how to generate a code. About returning a number instead of a string in the generate method, I don't agree, the code should always be treated as a string, I can't think of any useful operation you can do with that code as a number.