{"id":8179,"date":"2026-03-10T10:01:56","date_gmt":"2026-03-10T10:01:56","guid":{"rendered":"https:\/\/lysio2.klmwebsolutions.com\/?page_id=8179"},"modified":"2026-03-13T12:31:54","modified_gmt":"2026-03-13T12:31:54","slug":"2fa-verify","status":"publish","type":"page","link":"https:\/\/lysio2.klmwebsolutions.com\/en\/2fa-verify\/","title":{"rendered":"2fa Verify"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"8179\" class=\"elementor elementor-8179\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-fc96261 elementor-section-content-middle elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"fc96261\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4f391cf\" data-id=\"4f391cf\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6b8632a elementor-widget elementor-widget-heading\" data-id=\"6b8632a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">You should have received an email with 2FA code in your inbox.<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-85bb2d2 elementor-widget elementor-widget-heading\" data-id=\"85bb2d2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-heading-title elementor-size-default\">Add your 2FA Code here<\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0820ec2 vr-form elementor-widget elementor-widget-text-editor\" data-id=\"0820ec2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<form id=\"pin6a31f803de5fb\" class=\"otp-form\">\n<div class=\"flex gap-x-3 max-w-xs items-center font-lato\">\n  <input type=\"tel\" name=\"digit1\"\n    pattern=\"\\d*\" maxlength=\"1\"\n    class=\"block w-9.5 text-center border-gray-200 py-4! rounded-md sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none\"\n    autofocus=\"\">\n  <input type=\"tel\" name=\"digit2\"\n    pattern=\"\\d*\" maxlength=\"1\"\n    class=\"block w-9.5 text-center border-gray-200 py-4! rounded-md sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none\"\n    >\n\n  <input type=\"tel\" name=\"digit3\"\n    pattern=\"\\d*\" maxlength=\"1\"\n    class=\"block w-9.5 text-center border-gray-200 py-4! rounded-md sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none\"\n    >\n  <input type=\"tel\" name=\"digit4\"\n    pattern=\"\\d*\" maxlength=\"1\"\n    class=\"block w-9.5 text-center border-gray-200 py-4! rounded-md sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none\"\n    > \n<\/div>\n<p><input class=\"email_box\" type=\"hidden\" name=\"user_id\" value=\"\"><\/p>\n<p><input type=\"hidden\" name=\"user_nonce\" value=\"cc6630256b\"><\/p>\n<p align=\"center\"><button type=\"submit\" class=\"otp-btn rounded-[15px]! mt-10!\">Verify Now<\/button><\/p>\n<form>\n<div id=\"otp-result\"><\/div>\n      <div class=\"elementor-element elementor-element-7407e94 elementor-widget elementor-widget-text-editor\" data-id=\"7407e94\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n      <div class=\"elementor-widget-container\">If your code has expired or you didn\u2019t receive it, <span class=\"underline\"><a class=\"resend_code cursor-pointer\">click here<\/a><\/span> to resend <\/div>\n      <\/div>\n<script>\n  jQuery(function($){\n   \/* $(\"header\")[0]?.scrollIntoViewIfNeeded();*\/\n   $(\"header\")[0].scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n    jQuery(document).on(\"submit\", \".otp-form\", function(e) {\n      e.preventDefault();\n     jQuery(\"#otp-result\").html('');  \n      const form = jQuery(this);\n      const digits = [\n        form.find(\"input[name='digit1']\").val(),\n        form.find(\"input[name='digit2']\").val(),\n        form.find(\"input[name='digit3']\").val(),\n        form.find(\"input[name='digit4']\").val()\n        ];\n      const user_id = form.find(\"input[name='user_id']\").val();\n      const user_nonce = form.find(\"input[name='user_nonce']\").val();\n      const otp = digits.join(\"\");\n     if(user_nonce=='' || otp==''){\n      jQuery(\"#otp-result\").html('Please fill input boxes or try again');\n      return false;\n     }\n     $(\"#pin6a31f803de5fb button[type=submit]\").prop(\"disabled\", true);\n      $(\"#pin6a31f803de5fb button[type=submit]\").html(`<svg version=\"1.1\" id=\"L9\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" x=\"0px\" y=\"0px\" viewBox=\"25 25 50 50\" enable-background=\"new 0 0 0 0\" xml:space=\"preserve\" class=\"size-6\">\n        <path fill=\"#fff\" d=\"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50\">\n          <animateTransform attributeName=\"transform\" attributeType=\"XML\" type=\"rotate\" dur=\"1.7s\" from=\"0 50 50\" to=\"360 50 50\" repeatCount=\"indefinite\"><\/animateTransform>\n      <\/path>\n    <\/svg>`)\n      jQuery.ajax({\n        url: \"\/wp-admin\/admin-ajax.php\",\n        method: \"POST\",\n        dataType: \"JSON\",\n        data: {\n          action: \"verify_otp\",\n          otp: otp,\n          usr_id: user_id\n        },\n        success: function(data) {\n          $(\"#pin6a31f803de5fb button[type=submit]\").prop(\"disabled\", false);\n      $(\"#pin6a31f803de5fb button[type=submit]\").html(`Verify Now`)\n         console.log(data);\n          if(data.response=='200'){\n            jQuery(\"#verification-success\").hide();\n          jQuery(\"#verification-success-cheer\").show();\n          var msg = '<p class=\"success\">'+data.update_msg+'<\/p>';  \n          jQuery(\"#otp-result\").html(msg);\n          setTimeout(function() {\n             window.location.href = data.redirect; \/\/ dynamic redirect \n             }, 3000); \n\n          }\n          if(data.response=='400'){\n          var msg = '<p class=\"error\">'+data.update_msg+'<\/p>';  \n          jQuery(\"#otp-result\").html(msg);\n         }\n          jQuery('.otp-form')[0].reset();\n          jQuery('.otp-form inputs').val('');\n        },\n        error: function() {\n          $(\"#pin6a31f803de5fb button[type=submit]\").prop(\"disabled\", false);\n          $(\"#pin6a31f803de5fb button[type=submit]\").html(`Verify Now`)\n          jQuery(\"#otp-result\").html(\"Something went wrong. Please try again.\");\n        }\n      });\n    });\n\n\n jQuery(document).on(\"click\", \".resend_code\", function(e) {\n      e.preventDefault();\n      this.style.pointerEvents = \"none\";\n      this.style.cursor = \"default\";\n      this.style.textDecoration = \"none\";\n      this.style.color = \"#8660E7\";\n      this.parentElement.classList.remove(\"underline\");\n      const y = this;\n     jQuery(\"#otp-result\").html('');  \n     var res ='';\n     if(res==''){res = jQuery(\"#otp-popup .email_box\").val()\n          }\n\n      console.log(res);\n\n      jQuery.ajax({\n        url: \"\/wp-admin\/admin-ajax.php\",\n        method: \"POST\",\n        dataType: \"JSON\",\n        data: {\n          action: \"resend_otp\",\n          user_email: res\n        },\n        success: function(data) {\n          y.removeAttribute(\"style\")\n          y.parentElement.classList.add(\"underline\");\n          console.log(data);\n          y.classList.add(\"clicked\");\n          y.style.color = \"#8660E7\";\n          if(data.response=='200'){\n          var msg = '<p class=\"success\">'+data.update_msg+'<\/p>';  \n          jQuery(\"#otp-result\").html(msg);\n          }\n          if(data.response=='400'){\n          var msg = '<p class=\"error\">'+data.update_msg+'<\/p>';  \n          jQuery(\"#otp-result\").html(msg);\n         }\n          jQuery('.otp-form')[0].reset();\n          jQuery('.otp-form inputs').val('');\n        },\n        error: function() {\n          y.removeAttribute(\"style\")\n          y.parentElement.classList.add(\"underline\")\n          jQuery(\"#otp-result\").html(\"Something went wrong. Please try again.\");\n        }\n      });\n    });\n\n\n    const form = document.getElementById('pin6a31f803de5fb')\n    const inputs = [...form.querySelectorAll('input[type=tel]')]\n    const submit = form.querySelector('button[type=submit]')\n\n    const handleKeyDown = (e) => {\n        if (\n            !\/^[0-9]{1}$\/.test(e.key)\n            && e.key !== 'Backspace'\n            && e.key !== 'Delete'\n            && e.key !== 'Tab'\n            && !e.metaKey\n        ) {\n            e.preventDefault()\n        }\n\n        if (e.key === 'Delete' || e.key === 'Backspace') {\n            const index = inputs.indexOf(e.target);\n            if (index > 0) {\n                inputs[index].value = '';\n                inputs[index - 1].focus();\n                e.preventDefault()\n            }\n        }\n    }\n\n    const handleInput = (e) => {\n        const { target } = e\n        const index = inputs.indexOf(target)\n        if (target.value) {\n            if (index < inputs.length - 1) {\n                inputs[index + 1].focus()\n            } else {\n                \n            }\n        }\n    }\n\n    const handleFocus = (e) => {\n        e.target.select()\n    }\n\n    const handlePaste = (e) => {\n        e.preventDefault()\n        const text = e.clipboardData.getData('text')\n        if (!new RegExp(`^[0-9]{${inputs.length}}$`).test(text)) {\n            return\n        }\n        const digits = text.split('')\n        inputs.forEach((input, index) => input.value = digits[index])\n        \n    }\n\n    inputs.forEach((input) => {\n        input.addEventListener('input', handleInput)\n        input.addEventListener('keydown', handleKeyDown)\n        input.addEventListener('focus', handleFocus)\n        input.addEventListener('paste', handlePaste)\n    });\n  });\n<\/script>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>You should have received an email with 2FA code in your inbox. Add your 2FA Code here<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-8179","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/lysio2.klmwebsolutions.com\/en\/wp-json\/wp\/v2\/pages\/8179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lysio2.klmwebsolutions.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lysio2.klmwebsolutions.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lysio2.klmwebsolutions.com\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/lysio2.klmwebsolutions.com\/en\/wp-json\/wp\/v2\/comments?post=8179"}],"version-history":[{"count":31,"href":"https:\/\/lysio2.klmwebsolutions.com\/en\/wp-json\/wp\/v2\/pages\/8179\/revisions"}],"predecessor-version":[{"id":8244,"href":"https:\/\/lysio2.klmwebsolutions.com\/en\/wp-json\/wp\/v2\/pages\/8179\/revisions\/8244"}],"wp:attachment":[{"href":"https:\/\/lysio2.klmwebsolutions.com\/en\/wp-json\/wp\/v2\/media?parent=8179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}