Basic auth not working correctly

Hello,

I added basic authentication to the netlify.toml for my site (id: f43d6f6b-562d-4d11-a16c-90a238cf7d0a). However I am noticing that it is not working correctly.

Here is a build log

2:26:22 PM: build-image version: c3449036692ceba113a2b71302d561bccc8b6156 (focal)
2:26:22 PM: buildbot version: 6e5dfadf0eec598d7c9db5c1e005bfa46b6682c0
2:26:22 PM: Fetching cached dependencies
2:26:22 PM: Starting to download cache of 163.1MB
2:26:23 PM: Finished downloading cache in 1.717s
2:26:23 PM: Starting to extract cache
2:26:26 PM: Finished extracting cache in 2.545s
2:26:26 PM: Finished fetching cache in 4.314s
2:26:26 PM: Starting to prepare the repo for build
2:26:27 PM: Preparing Git Reference refs/heads/main
2:26:28 PM: Custom publish path detected. Proceeding with the specified path: ‘dist’
2:26:28 PM: Custom build command detected. Proceeding with the specified command: ‘npm run build’
2:26:28 PM: Starting to install dependencies
2:26:29 PM: Started restoring cached mise cache
2:26:29 PM: Finished restoring cached mise cache
2:26:30 PM: mise python@3.13.1 install
2:26:30 PM: mise python@3.13.1 download cpython-3.13.1+20241219-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
2:26:30 PM: mise python@3.13.1 extract cpython-3.13.1+20241219-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
2:26:30 PM: mise python@3.13.1 python --version
2:26:30 PM: mise python@3.13.1 Python 3.13.1
2:26:30 PM: mise python@3.13.1 ✓ installed
2:26:30 PM: Python version set to 3.13
2:26:32 PM: Collecting pipenv
2:26:32 PM: Downloading pipenv-2024.4.0-py3-none-any.whl.metadata (19 kB)
2:26:32 PM: Collecting certifi (from pipenv)
2:26:32 PM: Downloading certifi-2024.12.14-py3-none-any.whl.metadata (2.3 kB)
2:26:32 PM: Collecting packaging>=22 (from pipenv)
2:26:32 PM: Downloading packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
2:26:32 PM: Collecting setuptools>=67 (from pipenv)
2:26:32 PM: Downloading setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB)
2:26:32 PM: Collecting virtualenv>=20.24.2 (from pipenv)
2:26:32 PM: Downloading virtualenv-20.28.1-py3-none-any.whl.metadata (4.5 kB)
2:26:32 PM: Collecting distlib<1,>=0.3.7 (from virtualenv>=20.24.2->pipenv)
2:26:32 PM: Downloading distlib-0.3.9-py2.py3-none-any.whl.metadata (5.2 kB)
2:26:32 PM: Collecting filelock<4,>=3.12.2 (from virtualenv>=20.24.2->pipenv)
2:26:32 PM: Downloading filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB)
2:26:33 PM: Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.24.2->pipenv)
2:26:33 PM: Downloading platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
2:26:33 PM: Downloading pipenv-2024.4.0-py3-none-any.whl (3.0 MB)
2:26:33 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 55.8 MB/s eta 0:00:00
2:26:33 PM: Downloading packaging-24.2-py3-none-any.whl (65 kB)
2:26:33 PM: Downloading setuptools-75.6.0-py3-none-any.whl (1.2 MB)
2:26:33 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 55.0 MB/s eta 0:00:00
2:26:33 PM: Downloading virtualenv-20.28.1-py3-none-any.whl (4.3 MB)
2:26:33 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 108.3 MB/s eta 0:00:00
2:26:33 PM: Downloading certifi-2024.12.14-py3-none-any.whl (164 kB)
2:26:33 PM: Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB)
2:26:33 PM: Downloading filelock-3.16.1-py3-none-any.whl (16 kB)
2:26:33 PM: Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB)
2:26:33 PM: Installing collected packages: distlib, setuptools, platformdirs, packaging, filelock, certifi, virtualenv, pipenv
2:26:35 PM: Successfully installed certifi-2024.12.14 distlib-0.3.9 filelock-3.16.1 packaging-24.2 pipenv-2024.4.0 platformdirs-4.3.6 setuptools-75.6.0 virtualenv-20.28.1
2:26:36 PM: Attempting Ruby version 2.7.2, read from environment
2:26:36 PM: Using Ruby version 2.7.2
2:26:37 PM: Started restoring cached go cache
2:26:37 PM: Finished restoring cached go cache
2:26:39 PM: go version go1.19.13 linux/amd64
2:26:40 PM: Using PHP version 8.0
2:26:41 PM: Started restoring cached Node.js version
2:26:43 PM: Finished restoring cached Node.js version
2:26:44 PM: v18.20.5 is already installed.
2:26:44 PM: Now using node v18.20.5 (npm v10.8.2)
2:26:44 PM: Enabling Node.js Corepack
2:26:44 PM: Started restoring cached build plugins
2:26:44 PM: Finished restoring cached build plugins
2:26:44 PM: Started restoring cached corepack dependencies
2:26:44 PM: Finished restoring cached corepack dependencies
2:26:44 PM: No npm workspaces detected
2:26:44 PM: Started restoring cached node modules
2:26:44 PM: Finished restoring cached node modules
2:26:44 PM: Installing npm packages using npm version 10.8.2
2:26:46 PM: up to date, audited 572 packages in 1s
2:26:46 PM: 84 packages are looking for funding
2:26:46 PM: run npm fund for details
2:26:46 PM: found 0 vulnerabilities
2:26:46 PM: npm packages installed
2:26:46 PM: Successfully installed dependencies
2:26:46 PM: Starting build script
2:26:47 PM: Detected 0 framework(s)
2:26:47 PM: Section completed: initializing
2:26:49 PM: ​
2:26:49 PM: Netlify Build
2:26:49 PM: ────────────────────────────────────────────────────────────────
2:26:49 PM: ​
2:26:49 PM: ❯ Version
2:26:49 PM: @netlify/build 29.58.1
2:26:49 PM: ​
2:26:49 PM: ❯ Flags
2:26:49 PM: accountId: 5bad303fe39e7c544ed59793
2:26:49 PM: baseRelDir: true
2:26:49 PM: buildId: 677839c8a4fdff0008728fef
2:26:49 PM: deployId: 677839c8a4fdff0008728ff1
2:26:49 PM: ​
2:26:49 PM: ❯ Current directory
2:26:49 PM: /opt/build/repo
2:26:49 PM: ​
2:26:49 PM: ❯ Config file
2:26:49 PM: /opt/build/repo/netlify.toml
2:26:49 PM: ​
2:26:49 PM: ❯ Context
2:26:49 PM: production
2:26:49 PM: ​
2:26:49 PM: build.command from netlify.toml
2:26:49 PM: ────────────────────────────────────────────────────────────────
2:26:49 PM: ​
2:26:49 PM: $ npm run build
2:26:49 PM: > build
2:26:49 PM: > webpack
2:26:52 PM: Starting post processing
2:26:52 PM: Skipping form detection
2:26:52 PM: Post processing - header rules
2:26:52 PM: assets by path images/ 2.89 MiB 15 assets
2:26:52 PM: assets by path public/images/*.png 108 KiB
asset public/images/6ef86dadd54c705f1cab.png 23.3 KiB [emitted] [immutable] [from: public/images/thumbs/portland.png] (auxiliary name: main)
asset public/images/d0113c2acd335741a733.png 22.8 KiB [emitted] [immutable] [from: public/images/thumbs/engagement-video.png] (auxiliary name: main)
asset public/images/6cb603d61d50cb9544fb.png 22.7 KiB [emitted] [immutable] [from: public/images/thumbs/orlando.png] (auxiliary name: main)
asset public/images/ab500b1e4eaf4c2b3883.png 19.3 KiB [emitted] [immutable] [from: public/images/thumbs/napa.png] (auxiliary name: main)

  • 4 assets
    assets by chunk 17.9 KiB (name: main)
    asset main.js 12.5 KiB [emitted] [minimized] (name: main)
    asset bundle.css 5.45 KiB [emitted] (name: main)
    asset index.html 7.36 KiB [emitted]
    Entrypoint main 17.9 KiB (108 KiB) = bundle.css 5.45 KiB main.js 12.5 KiB 8 auxiliary assets
    orphan modules 31.3 KiB (javascript) 8.24 KiB (runtime) [orphan] 69 modules
    runtime modules 1.21 KiB 2 modules
    cacheable modules 5.44 KiB (css/mini-extract) 23.3 KiB (javascript) 108 KiB (asset)
    modules by path ./src/ 5.44 KiB (css/mini-extract) 23 KiB (javascript)
    modules by path ./src/scripts/components/ 3.01 KiB
    css ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/scripts/components/columnsComponent/_columnsComponent.scss 32 bytes [built] [code generated]
    + 7 modules
    ./src/scripts/main.ts + 21 modules 23 KiB [built] [code generated]
    css ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss 2.43 KiB [built] [code generated]
    asset modules 108 KiB (asset) 336 bytes (javascript)
    modules by path ./public/images/thumbs/.png 107 KiB (asset) 210 bytes (javascript) 5 modules
    modules by path ./public/images/icons/
    .png 1.93 KiB (asset) 126 bytes (javascript)
    ./public/images/icons/calendar.png 569 bytes (asset) 42 bytes (javascript) [built] [code generated]
    + 2 modules
    webpack 5.97.1 compiled successfully in 2432 ms

    2:26:52 PM: (build.command completed in 3.2s)
    2:26:52 PM: ​
    2:26:52 PM: Deploy site
    2:26:52 PM: ────────────────────────────────────────────────────────────────
    2:26:52 PM: ​
    2:26:52 PM: Starting to deploy site from ‘dist’
    2:26:52 PM: Calculating files to upload
    2:26:52 PM: 1 new file(s) to upload
    2:26:52 PM: 0 new function(s) to upload
    2:26:52 PM: Section completed: deploying
    2:26:52 PM: Site deploy was successfully initiated
    2:26:52 PM: ​
    2:26:52 PM: (Deploy site completed in 368ms)
    2:26:52 PM: ​
    2:26:52 PM: Netlify Build Complete
    2:26:52 PM: ────────────────────────────────────────────────────────────────
    2:26:52 PM: ​
    2:26:52 PM: (Netlify Build completed in 3.7s)
    2:26:53 PM: Post processing - redirect rules
    2:26:53 PM: Post processing done
    2:26:53 PM: Section completed: postprocessing
    2:26:53 PM: Site is live :sparkles:
    2:26:53 PM: Caching artifacts
    2:26:53 PM: Started saving node modules
    2:26:53 PM: Finished saving node modules
    2:26:53 PM: Started saving build plugins
    2:26:53 PM: Finished saving build plugins
    2:26:53 PM: Started saving mise cache
    2:26:53 PM: Finished saving mise cache
    2:26:53 PM: Started saving corepack cache
    2:26:53 PM: Finished saving corepack cache
    2:26:53 PM: Started saving pip cache
    2:26:53 PM: Finished saving pip cache
    2:26:53 PM: Started saving emacs cask dependencies
    2:26:53 PM: Finished saving emacs cask dependencies
    2:26:53 PM: Started saving maven dependencies
    2:26:53 PM: Finished saving maven dependencies
    2:26:53 PM: Started saving boot dependencies
    2:26:53 PM: Finished saving boot dependencies
    2:26:53 PM: Started saving rust rustup cache
    2:26:53 PM: Finished saving rust rustup cache
    2:26:53 PM: Started saving go dependencies
    2:26:53 PM: Finished saving go dependencies
    2:26:53 PM: Build script success
    2:26:53 PM: Section completed: building
    2:26:55 PM: Uploading Cache of size 163.1MB
    2:26:56 PM: Section completed: cleanup
    2:26:56 PM: Finished processing build request in 34.592s

Seems like everything is working correctly. So I am not sure what is going on. Any help would be greatly appreciated.

Thank you!

Basic auth is only available on Pro plans and above:

If you’d like to use this feature I’d recommend upgrading to the Pro tier.