otetard / ownpad

Ownpad is a Nextcloud application that allows to create and open Etherpad and Ethercalc documents.
GNU Affero General Public License v3.0
57 stars 24 forks source link

missing option to use OAuth credentials for etherpad-lite 2.X #141

Closed tommyhlw closed 2 months ago

tommyhlw commented 2 months ago

With etherpad-lite 2.X there is OAuth2.0 enforced and the used APIKEY is not offered anymore: https://github.com/ether/etherpad-lite/issues/6320

Input of ClientId and Secret would be required for Nextcloud and a service requesting a valid jwt for authentication.

SamTV12345 commented 2 months ago

I unfortunately don't really know PHP but as it seems you'd require changing the settings.php template and use any php library that supports client credentials grant for the requests. You can add a suitable client in the settings.json file of Etherpad like this:

      {
        "client_id": "client_credentials",
        "redirect_uris": [],
        "response_types": [],
        "grant_types": ["client_credentials"],
        "client_secret": "client_credentials",
        "extraParams": [
          {
            "name": "admin",
            "value": "true"
          }
        ]
      }
otetard commented 2 months ago

A beta version (0.11.0-beta.1) with OAuth2 support was released and will be available in a few minutes on Nextcloud App Store. A >2.0.2 version of Etherpad is required so we can use the client_credentials grant type (introduced in https://github.com/ether/etherpad-lite/pull/6325).

I’ll add some documentation in the main README.md before the final 0.11.0 release.

Please tell me if you encounter any issue!

tommyhlw commented 1 month ago

happy to read this. Thank you for maintaining OwnPad