System Information
- Running on xampp v3.2.2
- Windows 10 (1703: 15063:540)
- Chrome 60.0.3112.101 (64bit)
- PHP 7.1.7
- Joomla! 4.0-dev (joomla@4.0.0)
Steps to reproduce the issue
With Two Factor Authentication (afterwards called TFA) enabled, try to log in to <yourinstallpath>/administrator
with a user which has no TFA enabled.
For more information, see __ > Testing instructions__.
Summary of Changes
I removed the required class from the input field. There is a JS running which checks for this class and then adds the required aria-required="true"
which isn't needed for the Secret Key field.
Testing instructions
- Fresh installation of Joomla! 4.0-dev
- Enable TFA in administrator
- Go to Extensions > Plugins
- Enable Two Factor Authentication - Google Authenticator
- Enable Two Factor Authentication - YubiKey
- Create users
- Go to Users > Manage
- Create a new user
- Edit the new user and enable Two Factor Authentication
- Go to Two Factor Authentication Tab
- Select Google Authenticator as Authentication Method
- Follow the on screen instructions to set up Google Authenticator
- Create a new user
- Edit the new user and enable Two Factor Authentication
- Got to Two Factor Authentication Tab
- Select YubiKey as Authentication Method
- Follow the on screen instructions to set up YubiKey Authenticator
- Go to backend/administrator
<yourinstallpath/administrator
- Test without TFA
- Try to log in with superuser with wrong password
- Try to log in with superuser with wrong password and additional secret key (is always wrong)
- Try to log in with superuser with correct password and additional secret key (is always wrong)
- Login with superuser without TFA
- Log out
- Test with Google TFA
- Try to log in with Google TFA user with wrong password but no secret key
- Try to log in with Google TFA user with wrong password and wrong secret key
- Try to log in with Google TFA user with wrong password but correct secret key
- Try to log in with Google TFA user with correct password but no secret key
- Try to log in with Google TFA user with correct password but incorrect secret key
- Login with the user with Google TFA with the login box
- Log out
- Test with YubiKey TFA
- Try to log in with YubiKey TFA user with wrong password but no secret key
- Try to log in with YubiKey TFA user with wrong password and wrong secret key
- Try to log in with YubiKey TFA user with wrong password but correct secret key
- Try to log in with YubiKey TFA user with correct password but no secret key
- Try to log in with YubiKey TFA user with correct password but incorrect secret key
- Login with the user with YubiKey TFA with the login box
- Log out
If you have any other ideas to test this, please think outside the box!
Expected result
Checking if a user has TFA enabled in PHP is laborious (would be more of a JS thing). Therefore, it is okay to display the Secret Key field, but ignore it for users with no TFA enabled.
For users with not TFA enabled for them, it should look like this and login needs to be possible:

Actual result
At the moment, login with non-TFA-users in administrator is not possible. The Secret Key field is always required.

Summary of Changes
I removed the required class from the input field. There is a JS running which checks for this class and then adds the required aria-required="true"
which isn't needed for the Secret Key field.
Additional comments
This is a bugfix according to the bug I found in #17687
This fix is compatible with the changes made in #17687
Documentation Changes Required
The template file (default.php) isn't really documented so there are no changes needed.
Developed @icampus
I have tested this item✅ successfully on e874dc4
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17713.