Hacker News new | ask | show | jobs
by notresidenter 800 days ago
I see more and more website use multiple inputs with JavaScript to handle automatically moving from one to the other for OTP codes, including GitHub. It's always buggy because the devs reimplement basic navigation (focus, deletion, arrow keys, etc.) and it turns out that stuff is hard to get right, so they get it wrong. Often, just typing too fast breaks those inputs (<https://github.com/login/device/> for example).

A simple input is much better, even at the cost of a UI that is slightly more ambigous for the user on desktop (on mobile, there's a bagillion things to make inputting OTP codes easy).

1 comments

Yeah, I think basic input with some magic when using "paste" from different source formats is the way to go.