• Resolved gatta2

    (@gatta2)


    Hi, I’m using wp_login_form() directly on a page to login. Is it possible to modify it so that 2FA will work? I don’t want to use Theme My Login

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    Hi,

    In principle the plugin can work with any login form, but not necessarily without manual work to make any necessary adjustments. But that’s not necessarily the case if you build you form closely enough to imitate other supported forms. It’s probably best to look at the code of TML to see how it is doing it. Lots of things normally “just work” with TML without explicit support because it uses all the built-in WP functions and hooks, or need minimal alterations.

    David

    Thread Starter gatta2

    (@gatta2)

    My login is constructed using the following
    <?php $args = array(
    ‘redirect’ => home_url(),
    ‘value_remember’ => true
    );
    wp_login_form($args); ?>

    The problem is when the form is submitted, it’s redirected again to wp-login.php with the login form again and the message “Error: The one-time password (TFA code) you entered was incorrect.”

    Can you think of any reason why?

    Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    Hi,

    No, I’m sorry, I wouldn’t be able to work out that sort of thing without a deep dive into the code, which I’d only have time to do on a commercial basis. If you are interested in bespoke commercial work, please do use the enquiry form at https://www.simbahosting.co.uk and we can chat further.

    The only guess I can hazard on a quick think is that the WP login enqueue hook is not firing, and so the plugin is not enqueuing its JavaScript.

    David

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘modifying wp_login_form() to make 2FA’ is closed to new replies.