Use one-time-code
value of autocomplete
attribute with Multi-factor Authentication
Tuesday, October 27, 2020
Use one-time-code
value of autocomplete
attribute with Multi-factor Authentication
Using the <input autocomplete="one-time-code">
attribute makes it easy for your users to fill in the provided code with Multi-factor Authentication (MFA) or other forms of non-password authentication such as phone number authentication.
We all know that MFA can be very important for applications, especially those that contain sensitive data such as:
- personal identifiable information
- financial information
- social media
- and more
Multi-factor Authentication most often involves sending a user a code via SMS, which the user must then enter to confirm their identity. Trying to remember a code, or switching back and forth between apps, can be a hurdle your users certainly do not want.
Instructions
specify the one-time-code
autocomplete attribute value for input fields for MFA
Code Examples
specify the autocomplete attribute
<form-field>
<input type="text" name="code" autocomplete="one-time-code" />
</form-field>
omit the autocomplete attribute
<form-field>
<input type="text" name="code" />
</form-field>
Have a question or comment?