为何常失败
在应用间来回记数字负担大(Miller, 1956;Krol et al., 2015)。
自动填充与粘贴
one-time-code(MDN, n.d.-a)、WebOTP(MDN, n.d.-b)、SMS Retriever(Google, n.d.)。分格显示也应按一个输入处理,这是防错设计基础。
重发、有效期与无障碍
短有效期(NIST, 2024)并显示剩余时间;提供延时(WCAG 2.2 2.2.1),不禁止粘贴(3.3.8)。也可用生物识别登录。
常见问题
- 要分六格吗?
- 可视觉分格,但按一个输入处理。
- 收不到怎么办?
- 依次提供重发、核对号码与其他方式。
来源核查日期:2026-10-27
参考文献
- MDN Web Docs. (n.d.-a). HTML attribute: autocomplete. Mozilla. one-time-code自动填充。
- MDN Web Docs. (n.d.-b). WebOTP API. Mozilla. 网页自动读取短信验证码。
- Google. (n.d.). SMS Retriever API overview. Google for Developers. Android短信检索API。
- Krol, K., Philippou, E., De Cristofaro, E., & Sasse, M. A. (2015). "They brought in the horrible key ring thing!" Analysing the usability of two-factor authentication in UK online banking. In Proceedings of the Workshop on Usable Security (USEC 2015). Internet Society. 双因素认证的负担。
- National Institute of Standards and Technology. (2024). Digital identity guidelines: Authentication and authenticator management (NIST SP 800-63B-4). 验证码时效与短信局限。
- Miller, G. A. (1956). The magical number seven, plus or minus two: Some limits on our capacity for processing information. Psychological Review, 63(2), 81–97. 记住六位数的难度。
- World Wide Web Consortium. (2023). Web Content Accessibility Guidelines (WCAG) 2.2. 2.2.1与3.3.8标准。
