OAuth2 and Nextcloud

It’d be lovely to see someone (with more knowledge about it than I) provide a third-party plugin for using Nextcloud as an OAuth2 source here:


Since Nextcloud wants to play a central role in organizations, I think it’d make sense to use it as an OAuth2 provider (source) as well.


This is already possible for using Nextcloud Oauth to connect to Discourse (this forum software) and Rocket.chat so it definitely is possible. OpenID is another way you could handle this.

1 Like

That is indeed good news. It’d be nice if a “third-party” provider could be made and added to the repo I mentioned. I think that repo itself is quite useful for PHP developers, and it’d be nice to see Nextcloud featured there as a third-party (or official) plugin.

The problem is that Nextcloud instances always have different URLs, so it needs a customization each time. But I can confirm that OAuth2 / OpenID Connect works with Nextcloud as a provider.
P.S.: Hybridauth is another nice php library that works.

1 Like

Well, yes, that would have to be an argument to a constructor or function of course. Thanks for your feedback. I’ll have to have a look at Hybridauth too then :slight_smile:

When talking about using Nextcloud in an organization, I don’t think it should offer any but its primary service - Dropbox like storage/sharing. Wordpress, Office (OnlyOffice/Collabora), video conferencing (BBB/jitsi), user database (LDAP/AD, whatever), OTP/MFA/2FA (privacyIDEA/etc.), STUN/TURN servers (coturn) should all be external services… In the form of Docker, virtual machines or others… All bound together using SSO (Keycloak)…

This way when Nextcloud goes down (happens if you install every update, about one per month), you lose just one service in you your organization, not all of them.
And the latter would happen if Nextcloud runs your user database…

If you are not interested in this opinion, simply leave the person to do what they want. They are asking about Oauth, which is all that matters. :+1: