pdsinterop / solid-nextcloud

A plugin to make Nextcloud compatible with Solid
https://pdsinterop.org/solid-nextcloud/
MIT License
72 stars 11 forks source link

Client Registration #124

Closed NoelDeMartin closed 8 months ago

NoelDeMartin commented 1 year ago

I've been trying to use this with my app at https://umai.noeldemartin.com, and I got it to work but I had to do a couple of things manually. I wonder if it's an issue with my app, or if there is some bug in the Nextcloud extension.

The first time I tried using it, I got an error in the extension. After looking into it, I found out it happened because the clientId is not url-encoded in the approve request. In my case, the clientId was https://umai.noeldemartin.com/clientid.jsonld which is a url so it needs to be encoded to be passed as a url argument.

Once I fixed that, I continued moving forward and eventually sort-of got it to work, but I had to comment out a couple of things. Then I realized, it seems like clientIds are expected to be registered in some way. Once I found out about that, I manually registered my app calling the /index.php/apps/solid/register endpoint. This gave me an hexadecimal string for a clientId; and using this one it finally worked properly (I didn't even need to url-encode the clientIds in the various redirects).

So now I wonder. Are apps expected to call the /register endpoint before interacting with the extension? Is that part of the spec, or something specific to this extension? I am using Inrupt's authentication library, so I was assuming that if anything like that needs to happen, it would be encapsulated there.

Or maybe it should really work with an unregistered client, using the clientId url, but there are some bugs in the extension?

ylebre commented 8 months ago

This issue has been addressed in the 0.8.1 release - the issue was multiple compatibility issues in the extensions on our side.

Love the app BTW!