Axios disable username and pwd promt with basic auth

Viewed 51

Is there an option to diable the prompt when doing a basic auth with Axios or maybe at least hide it somehow?

   var base64encodedData = Buffer.from(this.username + ':' + hash.hex()).toString('base64');

       var config = {
        headers: { Authorization : 'Basic '  + base64encodedData},
        responseType: 'json'
      };

      axios.get('/users/self',config)
        .then((response) => {
          console.log("response");
          console.log(response);
          console.log(response.data);
      });

enter image description here

0 Answers
Related