title: Is it safe to send a password unencrypted via an AJAX POST to a Flask Backend, should I encrypt it on the client side?
body: <p>I have a form that I'm sending via AJAX to my Flask backend so I can skip the reload page, I've never really thought about it but is it wise to encrypt the password on the client side and decrypt it on the back end? What is the normal process for this? I'll be turning my Flask App into a desktop application using PyFlaDesk so it wont be hosted securely but on a users local machine, therefore it's only ever going to send the credentials to 'localhost:5000', do I even need to worry?</p>
  
  <pre><code>   let credentials = {
          'client_id': $('#clientid').val(),
          'client_secret': $('#clientsecret').val(),
          'username': $('#username').val(),
          'password': $('#password').val(),
      }
  
      $.ajax({
          url: '/authorise',
          contentType: "application/json;charset=utf-8",
          data: JSON.stringify({credentials}),
          dataType: "json",
          type: 'POST',
          success: function(response){
              console.log(response);
          },
          error: function(error){
              console.log(error);
          }
          });
  </code></pre>