Configure password protection (preview)
You can use a password to protect your app's pre-production environments or all environments. Scenarios when password protection is useful include:
- Limiting access to your static web app to people who have the password
- Protecting your static web app's staging environments
Password protection is a lightweight feature that offers a limited level of security. To secure your app using an identity provider, use the integrated Static Web Apps authentication. You can also restrict access to your app using IP restrictions or a private endpoint.
Prerequisites
An existing static web app in the Standard plan.
Enable password protection
Open your static web app in the Azure portal.
Under Settings menu, select Configuration.
Select the General settings tab.
In the Password protection section, select Protect staging environments only to protect only your app's pre-production environments or select Protect both production and staging environments to protect all environments.
Enter a password in Visitor password. Passwords must be at least eight characters long and contain a capital letter, a lowercase letter, a number, and a symbol.
Enter the same password in Confirm visitor password.
Select Save.
When visitors first go to a protected environment, they're prompted to enter the password before they can view the site.
Next steps
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for