meichthys / nextcloud_monitor

Python wrapper around Nextcloud monitor api
MIT License
2 stars 2 forks source link

Use the Login Flow from NC25 upwards #3

Closed devPeete closed 1 year ago

devPeete commented 1 year ago

According to the documentation of Nextcloud 25: https://docs.nextcloud.com/server/21/developer_manual/client_apis/LoginFlow/index.html?highlight=converting%20app%20passwords We need to announce "OCS-APIRequest": "true" in the header to be able to use App Passwords. This still works with user passwords aswell. Tested with local instance of NC24 and 25 with both user passwords and app passwords. Without this fix app passwords will fail on at least Nextcloud 25.

meichthys commented 1 year ago

Perhaps there's a deprecation period? I'm running nextcloud 25 and haven't had any issues yet even though i use a 2fa app-password.

devPeete commented 1 year ago

I'll update a second instance later today, I will re-test it on that instance. However, on my local instance it fixed the issue I had. Without the fix, the self.data is an empty list.

devPeete commented 1 year ago

Nvm, I don't know what went wrong the other 3 days. However, now it works without anouncing this in the header. I'll close this one.