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

When using File Picker, Login into Nextcloud shows up nextcloud webpage instead of files in nextcloud #31

Closed pkmkrishnakumar-zz closed 6 years ago

pkmkrishnakumar-zz commented 6 years ago

When using File Picker shows up like this image

When login into the nextcloud via popup window ,it logs into nextcloud and not showing the files in file picker.

image

Thus help me out to set up the nextcloud repository in moodle

Dagefoerde commented 6 years ago

Are these screenshots a direct sequence, or do you see any other screens in the meantime? (Like a login form or buttons for authorisations?)

pkmkrishnakumar-zz commented 6 years ago

On first attempt a autherization screen displayed in which grant access is provided following that a login screen of nextcloud is being dispalyed , in which i gave the login credentials of the user.

After which it show up the default screen of nextcloud instead of files in nextcloud in file picker window.

Other details: Nextcloud Version: 13.0.1 Moodle : 3.4+ Self Signed Certificate for Nextcloud (https://lms-jit/nextcloud) Moodle is access via http and not https (http://lms-jit/moodle)

Dagefoerde commented 6 years ago

Now that you're logged into Nextcloud in your browser already, if you press "Log in to your account" in Moodle again, which screen comes up?

pkmkrishnakumar-zz commented 6 years ago

In moodle no response , It keep on shows the "Log in to your account"

If click it doesn't shows up, no response

If i close the pop up window opened earlier, and click the "Log in to your account" in moodle again a pop up window shows up as earlier (Logged in window of nextcloud.

Do i make any mistake in configuring in moodle?

I will show the settings made in moodle:

image image image image

Dagefoerde commented 6 years ago

All your Moodle configuration looks good to me. Therefore I think the error is with Nextcloud. Please have a look at your Nextcloud logs while attempting a connection and see if something comes up. Also, please double-check your Apache configuration according to the Nextcloud documentation. If the issue persists, the Nextcloud community might be able to help you out.

pkmkrishnakumar-zz commented 6 years ago

Nextcloud setting for OAuth 2.0 Clients

image

Can anyone provide me the minimum configuration requirements of Apache2 and Nextcloud, to make this app work in moodle. Is there any dependencies in nextcloud or apache to be satisfied?

I am not sure to what to do next? Please any one guide me to sort this problem out.

Dagefoerde commented 6 years ago

I'm really just a Moodle plugin developer, so I can't help out here, sorry. I only know about Apache modules that are required for ownCloud, but this might or might not apply to Nextcloud: https://github.com/owncloud/oauth2/issues/110. Probably it's worth a try.

Maybe someone will see your inquiry here and can help, otherwise the Nextcloud community at https://help.nextcloud.com will be able to help you get OAuth 2 working in your Nextcloud+Apache setup.

pkmkrishnakumar-zz commented 6 years ago

Interesting I got other kind of results by changing Moodle settings as shown below: image

Sequence of Operations in Moodle after making some change in OAuth 2 Services: image

Click on Login in to your account

image

Click on Grant Access

image

Log in to your account

Now Pop up window displays default home page of moodle instead of redirecting to contents of cloud in file picker

image

Earlier in the post, I have posted previous settings in OAuth 2 Services, with that settings, pop up window did not close, but shows up nextcloud home page Now with current settings (in this post), pop up window did not close as earlier case, but shows up moodle home page

Its disgusting for me whats happening

Seriously, I am not a coder/programmer either but an novice end user

Please help me out where is the mistake either in Moodle or Nextcloud

Nextcloud OAuth 2.0 Client settings: image

Is there any thing to do with redirect url in nextcloud

Dagefoerde commented 6 years ago

The redirect URI that you set up in Nextcloud looks good to me. I assume that this error results from a Nextcloud misconfiguration, because Nextcloud is redirecting you to a wrong page. However, as I said, I am at a loss here. Sorry I can't help you any further. Please refer to the links I posted above, especially to the Nextcloud community (https://help.nextcloud.com) because there you will find people who know more about Nextcloud who may even have encountered your particular error. Thanks.