ta.status === 0) {
                    result = true
                } else {
                    alert(data.msg);
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(errorThrown + ' : ' + XMLHttpRequest.responseText);
            }
        });
        return result
    }

    $("#auth_type").change(function() {
        let auth_type = $("#auth_type").val();
        if (auth_type === 'totp') {
            $("#totp-form").show();
    