Why does HTTP authentication fail? nodeJS request

Hello everyone. Trying to make a request using the request{[3] module]}

request({
    url: config.endpoint+'/name',
    auth: {
        username: 'Name',
        password: 'Pass'
    },
    method: 'POST',
    json: true,
    strictSSL: false,
    body: {json: 123}
}, async (e, resp, data) => {
});

But I get an authentication error. At the same time, the following kurl from the console works fine:

curl -k -u Name:Pass -H 'Content-Type: application/json' -d '{"data":"123"}' https://url/name

I made a kurlom and request request to my server, the Authorization header comes the same.

The documentation on this subject says the following: For authentication, the Basic HTTP Access authentication scheme (HTTP Basic access authentication scheme) with the header is used "Authorization", according to RFC7617.

Author: Matt Bakner, 2020-06-05