Hi,
When you are trying to log back in, does the URL contain many extra parts, ie, query parameters which begin with a “?” character?
If so, have you tried deleting everything starting from the “?” character to the end and then trying to log in with the base URL which represents your renamed login page?
The URL after entering correct OTP password is following
http://MYURL.DOMAIN/tuktuk?redirect_to=http%3A%2F%2FMYURL.DOMAIN%2Fwp-admin%2F&aiowps_login_msg_id=session_expired
where MYURL.DOMAIN — is my domain
If I delete everything after ? then everything is the same. I am not able to login 🙁
Hi,
I did some tests and here’s what I think is happening:
both the aiowps and that two-factor plugins are hooking into the wp_login action hook with the same priority of 10.
So during login, the two-factor hooks into the “wp_login” before the aiowps plugin.
The two-factor plugin has a function called “wp_login” where it displays the form and then uses php “exit” command.
But the problem is that after this, the aiowps plugin does not get a chance to hook into the wp_login action which means it never updates the “last_login_time”.
In other words the two-factor plugin is terminating execution after it does its thing but this is preventing other plugins from trying to hook into that same action hook.
For now an easy fix is to set the aiowps priority to 9 which means it will get a chance to hook into that action before the two-factor plugin.
I will make this small change for the next release but you can manually do it yourself now if you wish.
Edit the wp-security-core.php file and look for the following line:
add_action('wp_login', array('AIOWPSecurity_User_Login', 'wp_login_action_handler'), 10, 2);
Change the above to the following:
add_action('wp_login', array('AIOWPSecurity_User_Login', 'wp_login_action_handler'), 9, 2);
This change will fix this issue, but I wonder whether the two-factor code will affect other plugins who are also hooking into wp_login with priority 10 or higher?
-
This reply was modified 4 years, 3 months ago by
wpsolutions.
I forgot to say – it will be a better solution to ask the two-factor plugin developer to bump up the priority number in their code for the wp_login hook, ie, they should use a priority larger than 10.
By doing that they may prevent issues with other plugins which also use the wp_login hook.