Has anyone succeeded in using discourse as sso provider for nextcloud? Share recipe?

I’d suggest GitHub.

IMHO that’s the best way to implement it, since the id is used primarily internal and not visible in many places to normal users.
Nextcloud has no easy way to rename users, but Discourse has. Renaming a user in Discourse could lead to some strange behavior with Nextcloud if the names don’t match any more.

The avatar_url from DiscourseConnect should get passed to Nextcloud and read there. If you want to pass the bio too, a few lines in in the branch responsible for the profile updates should do the job.

You should use device passwords instead. The Nextcloud password could be different from the Discourse password, which would lead to confusion and skips the SSO.

I think these are general issues with the Nextcloud UI and not app specific.

Set the social_login_auto_redirect option to true as described in the config section if you want hide the Nextcloud login completely.

2 Likes