learnweb / moodle-repository_owncloud

[ARCHIVE] Starting Moodle 3.6, our plugin ships with Moodle! :tada: Use this:
https://docs.moodle.org/en/Nextcloud_repository
GNU General Public License v3.0
8 stars 8 forks source link

"error/Could not decode JSON token response" with CAS login #23

Closed fishfree closed 7 years ago

fishfree commented 7 years ago

Following the instructions, I successfully installed, configured and test this great plugin with Owncloud local user accounts. But for Owncloud CAS users (realized by this plugin), it failed. Steps as below:

  1. Click on "Login to your account" in Moodle, the Owncloud login page shows up;
  2. Click on "CAS Login", login in Owncloud, and then "Authorize", but now:
  3. The popup window redirects to the Moodle page, showing error: error/Could not decode JSON token response. The popup window con not close automatically and shows repository in Moodle.

Edit: I find that for the first time connecting Owncloud from Moodle, it succeeded, but for the second and later time, it always showed this error.

Dagefoerde commented 7 years ago

Hi fishfree, sorry, I don't know about the CAS authentication, especially in ownCloud. However, the Moodle message "Could not decode JSON token response" hints at a problem with the response that Moodle receives from ownCloud. So I think this is a problem in ownCloud, resulting from particuliarities in ownCloud CAS authentication. I'd suggest you should add an issue about this in their repository: https://github.com/owncloud/oauth2 , I hope they can help you. Please also report back if there's anything we need to do! :)

fishfree commented 7 years ago

@Dagefoerde I edited my question, would you pls have a look? Thank you!