News for hackers. Stuff that matters.
Re:Behind the 6-digit code: Building HOTP and TOTP from scratch by anilakar on Tuesday April 15, 2025 @02:15AM (#43689523)
> HOTP/TOTP has a registration step, where you copy a server-generated secret to your phone through a QR-code-encoded otpauth:// URI

RFC4226 and RFC6238 do not specify anything but the actual algorithm(s), which is exactly what OP implemented.

Re:Behind the 6-digit code: Building HOTP and TOTP from scratch by dfox on Tuesday April 15, 2025 @04:02AM (#43690165)
And many actual implementations work the other way around. Which opens the user to credential compromise but is much better user experience (and only one possible with several kinds of hardware tokens).