Sync Nextcloud users to .htpasswd

I am wondering, is it possible to authenticate users via nextcloud, and give them access to other sites on the server only when they are logged in? Or maybe sync the users to the .htpasswd file of an other site so they can use the same credentials?

I have looked at SSO but I don’t really understand it.

Thanks for any thoughts!

You can’t just export the user’s credential into a .htpasswd-file. You could use a LDAP backend, you can authenticate NC users to this backend and apache also has an authentication module for LDAP.