Protect your preview environments with HTTP Basic Authentication.

Availability

Password protection is available on all plans.

Setting Credentials

Use the --credentials flag when creating an environment:

prev create . --credentials username:password

Example

prev create . --credentials admin:mysecretpass

Anyone visiting the preview URL will be prompted for a username and password before they can access the content.

Using with Templates (Business)

Save credentials in a deployment template so your team doesn't have to specify them each time:

prev create . --template client-demo

Where the client-demo template has credentials pre-configured.

Notes

  • Credentials are transmitted over HTTPS (SSL is always enabled)
  • There is no limit on the number of users who can access the preview with the credentials
  • To change credentials, destroy the environment and create a new one
  • Password protection applies to the entire environment — there is no per-page control