            }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(errorThrown + ' : ' + XMLHttpRequest.responseText)
            }
        });
    }

    function authOTP(otp) {
        $.ajax({
            type: "post",
            url: "/api/v1/user/2fa/verify/",
            dataType: "json",
            data: {
                engineer: '{{ user.username }}',
                auth_type: $("#auth_type").val(),
                key: $("#qrcode-img").at