Hello,
I was looking for a similar feature and finally found a solution. I’m explaining it here because it might be useful for someone else too.
I actually found two solutions:
1) The first was to use Netlify and the “Identity” function: https://docs.netlify.com/security/secure-access-to-sites/identity/
The problem was that I didn’t want to pay Netlify just for that. The free version is sufficient for my purposes.
2) Then, as part of a webshop project, I used Infomaniak for hosting and discovered that they had a user management system on the server (management with encrypted password). => https://www.infomaniak.com/en/support/faq/68/password-protect-a-site-folder
I now host a Publii site with the “Documentation” theme with restricted access using FTP.
The next step for me will be to automate this to give access when someone is added to my database.
I also imagine that other hosts offer the same thing.