axios-ntlm is a helper library designed to integrate NTLM (NT LAN Manager) authentication into the popular Axios HTTP client, specifically for Node.js environments. It achieves this by attaching interceptors to an Axios instance, allowing seamless NTLM authentication for resources that require it. The current stable version is `1.4.6`. The package generally maintains a moderate release cadence, primarily focusing on dependency updates, bug fixes, and minor enhancements. Its key differentiator lies in its direct integration with Axios, providing a familiar API for developers already using Axios, and simplifying the often complex process of NTLM authentication in JavaScript applications interacting with Windows-authenticated services. It is particularly useful in enterprise settings where NTLM remains prevalent.
npm install axios-ntlmVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to create an NTLM-enabled Axios client using provided credentials and perform a simple GET request to a protected resource.
Immediately upgrade to `axios-ntlm@1.2.2` or later to mitigate potential security risks and ensure application security.
Upgrade to `axios-ntlm@1.4.1` or later to resolve the infinite retry bug. If using an older version, avoid sending `X-retry: false` headers.
Ensure your custom `AxiosRequestConfig` correctly sets `httpAgent` and `httpsAgent` with `keepAlive: true` for optimal performance with NTLM authenticated endpoints.
Upgrade your `axios-ntlm` package to version `1.4.1` or higher. If an upgrade is not immediately possible, avoid sending `X-retry: false` headers when making requests.