Sadly, unless I am mistaken (and glad to be corrected!) a tight integration between discourse and nextcloud is going to be too cumbersome and I don’t think anyone has appetite to create it. So creating sharing links in nextcloud and then using those in Discourse is pretty much as far as it goes.
This I have been doing with great success for a few years now, using the social login plugin in nextcloud. It provides a “Custom Discourse” option out of the box that is quite easy to set up and the user experience is fairly seamless.
Users who are not logged in already are prompted with options to log in using discourse or a password.
If they don’t already have an account, an account is created for them upon login. Their groups are mapped from discourse to nextcloud which can then be set up to provide access permissions depending on the group they are in.

