Skip to content

Authentication

Jack Cooper edited this page Jul 15, 2026 · 2 revisions

If you are trying to access packages that require authentication, Unity's package manager (UPM) requires authentication details saved in your global .upmconfig.toml file.

Step 1: Get your Registry Token

  1. Navigate to the TrickleCharge Registry Dashboard.
  2. Click the Login button and select Login with GitHub.
  3. Once authenticated, click on the ⚙️ gear icon in the top right corner.
  4. Expand the npm section.
  5. Copy your generated Auth Token from the provided npm configuration snippet (Only the text within the quotes).

Example

npm config set //npm.tricklecharge.dev/:_authToken "xxxxxxxxxxx"

"xxxxxxxxxxx" is your auth token.


Step 2: Configure UPM

Automatic Scripts

Linux / macOS / WSL:

bash <(curl -sSL https://raw.githubusercontent.com/Trickle-Charge/packages-unity/main/scripts/configure-upm-auth.sh)

Windows (PowerShell):

irm https://raw.githubusercontent.com/Trickle-Charge/packages-unity/main/scripts/configure-upm-auth.ps1 | iex

Command Line

Copy and paste the command below into your terminal. It will prompt you for the token you copied in Step 1 and it into your configuration.

Linux / macOS / WSL:

printf "Enter your TrickleCharge Registry Token: " && read -r REGISTRY_TOKEN && \
cat <<EOF >> ~/.upmconfig.toml

[npmAuth."https://npm.tricklecharge.dev/"]
_authToken = "$REGISTRY_TOKEN"
alwaysAuth = true
EOF
echo -e "\nSetup complete! Configured ~/.upmconfig.toml"

Windows (PowerShell):

& {
    $Token = Read-Host "Enter your TrickleCharge Registry Token"
    $ConfigPath = Join-Path $Home ".upmconfig.toml"
    $ConfigLines = @(
        "`n"
        '[npmAuth."https://npm.tricklecharge.dev/"]'
        "_authToken = `"$Token`""
        "alwaysAuth = true"
    )

    Add-Content -Path $ConfigPath -Value $ConfigLines
    Write-Host "Setup complete! Configured $ConfigPath" -ForegroundColor Green
}

Manual Setup

Create / modify your .upmconfig.toml and add an entry.

[npmAuth."https://npm.tricklecharge.dev/"]
token = "xxxxxxxxxxx"
alwaysAuth = true

.upmconfig.toml can be found at:

OS Path
Linux ~/.upmconfig.toml
Windows %USERPROFILE%\.upmconfig.toml

Clone this wiki locally