• Resolved dev

    (@devksec)


    Hello,

    I’ve installed two factor to allow woocommerce users to have 2FA using the following code:

    add_action('woocommerce_after_edit_account_form', 'custom_wc_after_edit_account_form');
    function custom_wc_after_edit_account_form() {
       echo '<br><h2 class="screen-heading general-settings-screen">Two Factor Authentication</h2>';
    
       echo do_shortcode('[twofactor_user_settings]');
    }

    When I login as a test user I can see the settings for 2FA within the account details. However a “Security check” error pops up when the code refreshes or when you try enable this. I also dont see any place for users to enter a 2FA code when trying to login ?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter dev

    (@devksec)

    Seems this being logged to the console

    SyntaxError: Unexpected token S in JSON at position 0
        at JSON.parse (<anonymous>)
        at Object.success ((index):83)
        at i (jquery.js?ver=1.12.4-wp:1)
        at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:1)
        at x (jquery.js?ver=1.12.4-wp:1)
        at XMLHttpRequest.c (jquery.js?ver=1.12.4-wp:1)
    (index):106 Security check

    Then once the popup is clicked

    [Violation] 'readystatechange' handler took 4119ms
    (index):134 Security check (3).
    (index):135 SyntaxError: Unexpected token S in JSON at position 0
        at JSON.parse (<anonymous>)
        at Object.success ((index):130)
        at i (jquery.js?ver=1.12.4-wp:1)
        at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:1)
        at x (jquery.js?ver=1.12.4-wp:1)
        at XMLHttpRequest.c (jquery.js?ver=1.12.4-wp:1)
    (index):140 TFA: no code found
    jquery.js?ver=1.12.4-wp:1 [Violation] 'readystatechange' handler took 1262ms
Viewing 1 replies (of 1 total)
  • The topic ‘Issue with woocommerce & 2fa for front user’ is closed to new replies.