When creating a prototype website you want to restrict access to websites using Basic Authentication (and IP filter).
Currently, we can use many providers (https://docs.microsoft.com/en-us/azure/static-web-apps/authentication-authorization) to add login logic to our app, but I didn't found any info on how to restrict access to the entire website with a password.
Netlify allows that: https://docs.netlify.com/visitor-access/password-protection/
Vercel (Zeit) also supports that: https://vercel.com/blog/protecting-deployments
If there is a way to add basic authentication please let me know. If not, then please consider this feature request.
I'm searching for code solutions to this problem and ended up here!
@miwebst can we have an update on this?
Hi @Misiu
I dont have any updates on this right now, we've added this to our backlog but I dont have an ETA's on when this will be available.
Thanks,
Mitch
Thanks for the update
My client needs this, too.
I think this functionality is a necessity — especially since the SWA workflow emphasizes the use of live staging environments. It would be great to password-protect the staging environments while they are being finalized.
I added .htaccess and .htpasswd for activation Basic Authentication on Static Web Apps but I think Static Web Apps doesn't have basic auth feature. We need this feature for set development and staging environment because the crawler can't get page and need more simple auth process.
Most helpful comment
I think this functionality is a necessity — especially since the SWA workflow emphasizes the use of live staging environments. It would be great to password-protect the staging environments while they are being finalized.