Authentication

Login to Bytesafe with your npm, yarn or pnpm client.

To access your private Bytesafe registries using npm clients users will need to authenticate and create a valid access token.

Credentials for npm, yarn or pnpm

Credentials for authentication are available in Bytesafe.

Instructions, and the current session token, is found in the Registry Information available by clicking the More info button in the top right corner of a registry page:

registry-credentials

Access tokens

Accessing a Bytesafe registry using either npm, yarn or pnpm, requires a valid access token stored in the file .npmrc (typically ~/.npmrc).

# access token for a registry is stored in .npmrc file
..
//workspace.bytesafe.dev/r/example-registry/:_authToken=01EBPCA..

You add an access token to ~/.npmrc by running npm login command (see client specific instructions below).

Client specific instructions

To make sure access tokens are always sent to the Bytesafe server, set this config (once)

npm config set always-auth true

Login to your private Bytesafe registry

npm --registry 'https://example.bytesafe.dev/r/default/' login

You will be prompted for the user name (always bytesafe), password (use the session token from the web app) and an email address. The email address is not used by Bytesafe, but is required input.

Username: bytesafe
Password:
Email(this IS public): example@example.com
Logged in as bytesafe on https://example.bytesafe.dev/r/default/.

To make sure access tokens are always sent to the Bytesafe server, set this config (once)

npm config set always-auth true

Login to your private Bytesafe registry

npm --registry 'https://example.bytesafe.dev/r/default/' login

You will be prompted for the user name (always bytesafe), password (use the session token from the web app) and an email address. The email address is not used by Bytesafe, but is required input.

Username: bytesafe
Password:
Email(this IS public): example@example.com
Logged in as bytesafe on https://example.bytesafe.dev/r/default/.

To make sure access tokens are always sent to the Bytesafe server, set this config (once)

npm config set always-auth true

Login to your private Bytesafe registry

pnpm login --registry 'https://example.bytesafe.dev/r/default/'

You will be prompted for the user name (always bytesafe), password (use the session token from the web app) and an email address. The email address is not used by Bytesafe, but is required input.

Username: bytesafe
Password:
Email(this IS public): example@example.com
Logged in as bytesafe on https://example.bytesafe.dev/r/default/.

Managing tokens

How to manage your tokens. Learn how to list, create and revoke tokens.