I self-host everything, and I wrote an authentication framework, which I call "Fancy Auth". It is configurable by YAML and works like a proxy in front of all my web apps. It's like a glorified Basic Auth, but can connect to LDAP, htpasswd files, can login with QR Code and Magic Link or via SSH.
I plan to release it some day though.