Well this was an interesting learning experience.

https://dev.to/charca/password-protection-for-cloudflare-pages-8ma