Moodle for mobile

Moodle Mobile Oauth2 multiple time confirmation

 
Picture of Asad Nauman Shahid
Moodle Mobile Oauth2 multiple time confirmation
 
Hi,

I have enabled Oauth2 in moodle. 

  • On using the mobile application I get the message "You need to log in to the site in a browser window" (OK).
  • After login it takes me back to mobile application and same message appears again (instead of login).
  • No I again press OK button and browser window launches (self authenticates) and then mobile application goes to "My Course" section and I get the same message  again .
  • At this point i am login to mobile app and every thing works.

It should ask for login only once.

Thanks in advance.

Regards,
Asad



 
Average of ratings: -
Picture of Juan Leyva
Re: Moodle Mobile Oauth2 multiple time confirmation
Group Core developersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Asad,

what plugin are you using for Oauth2?

Have you tried to use the embedded browser setting instead the normal browser one?

Juan

 
Average of ratings: -
Picture of Asad Nauman Shahid
Re: Moodle Mobile Oauth2 multiple time confirmation
 

Hi Juan,

I am using "Moodle Mobile additional features"
https://docs.moodle.org/31/en/Moodle_Mobile_additional_features#Installation

the video at only asks for login once but in my case it appears 3 times

Embedded browser is not working and I use "Via browser window". Version of Moodle is 3.2.

Every things goes fine except receiving multiple logins in browser.

Regards,
Asad
 
Average of ratings: -
Picture of Dani Palou
Re: Moodle Mobile Oauth2 multiple time confirmation
Group Core developersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developers

Hi Asad,

sorry for the delay in answering.

Which version of the app do you have installed? You can check it in App Settings > About.

Kind regards,

Dani

 
Average of ratings: -
Picture of Asad Nauman Shahid
Re: Moodle Mobile Oauth2 multiple time confirmation
 
Hi Dani,

Thanks for the reply.

I am  using node v0.12.7 as recommended in https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2  and version of Moodle is 3.2

App Settings are as Follows:
Moodle Mobile: 2.8
Apache: 2.0
Version Name : 2.8
Version Code: 2009
Cordova Version: 5.1.0
Cordova Device Platform: Android




Regards,
Asad
 
Average of ratings: -
Picture of Dani Palou
Re: Moodle Mobile Oauth2 multiple time confirmation
Group Core developersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developers

Hi Asad,

you should update the app version, we did some fixes a while ago to those modals. The latest release is version 3.2.0.

I guess you're building a custom app, so you should rebase your changes against the master branch of the moodlemobile2 repository.

Kind regards,

Dani

 
Average of ratings: Useful (1)
Picture of Asad Nauman Shahid
Re: Moodle Mobile Oauth2 multiple time confirmation
 

Hi Dani,


I also downloaded official app from android play store and it was also stuck on mm.login.authenciate.  I closed the app and opened again then after login it worked.


Looks like issue while making sessions or getting token from the browser window for the first time.


Thanks,

Asad





 
Average of ratings: -
Picture of Asad Nauman Shahid
Re: Moodle Mobile Oauth2 multiple time confirmation
 

I am using OAuth for login

 
Average of ratings: -
Picture of Dani Palou
Re: Moodle Mobile Oauth2 multiple time confirmation
Group Core developersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developers

Hi Asad,

can you send me a test account to mobile@moodle.com so I can reproduce the problem and check what is happening? I need the Moodle URL, username and password. I'll try it with the Moodle Mobile app.

Thank you,

Dani

 
Average of ratings: -
Picture of Asad Nauman Shahid
Re: Moodle Mobile Oauth2 multiple time confirmation
 

Hi Dani,

The site URL is "http://moodle.dvrdns.org".

Is your email "mobile@moodle.com" linked with google apps? The reason I am asking is that you will not need to enter user and password, you will have to allow in OAuth and your email address is now allowed to login to the site.  There is a button named "Login with Google" after you provide site in mobile app.


Thanks,

Asad




 
Average of ratings: -
Picture of Dani Palou
Re: Moodle Mobile Oauth2 multiple time confirmation
Group Core developersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developers

Hi Asad,

I just tried it. The first time I authenticated, when I had to authorize my GApps account, your site added a hash to the end of the launch URL for some reason. Moodle launches the app with a URL like this:

$urlscheme://token=$apptoken

In this case, there was a hash (#) at the end of the URL. The app doesn't expect that, so it failed and it left an "Authenticating" modal shown forever. I opened an issue to handle this:

https://tracker.moodle.org/browse/MOBILE-2072

I restarted the app and I authenticated again, and then it worked fine everytime I tried. I've never seen multiple confirmations.

In which device are you testing this?

Kind regards,

Dani

 
Average of ratings: Useful (1)
Picture of Asad Nauman Shahid
Re: Moodle Mobile Oauth2 multiple time confirmation
 

Hi Dani,

Thank you very much Dani for you your help and creating issue for this.

Multiple confirmation was with an older version of the app (APP: 2.8).  With latest version  (APP: 3.2.1) it is only once (stuck) while adding a new account / site.


Also one more thing recommended version of node is v0.12.7 as mentioned at https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2, and while compiling it gives deprecated  warning, is there any chance in future we will be updating node version?


Best Regards,

Asad


 
Average of ratings: -
Picture of Dani Palou
Re: Moodle Mobile Oauth2 multiple time confirmation
Group Core developersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developers

Thanks Asad,

we have an issue for updating Node, it is currently waiting for integration. It should land soon!

https://tracker.moodle.org/browse/MOBILE-1796

Kind regards,

Dani

 
Average of ratings: -
Picture of Asad Nauman Shahid
Re: Moodle Mobile Oauth2 multiple time confirmation
 

Thank you again Dani



Best Regards,

Asad


 
Average of ratings: -