Moodle for mobile

Moodle mobile, login SSO not returning to app

 
Picture of Dalberto Doe
Moodle mobile, login SSO not returning to app
 

(Hi, 


I have some problems with Shibboleth authentication,  i downloaded the sources for v3.5.0 and v3.5.2 and the same problem.

so, the problem is that when i login in the app, urlscheme dont works as expected and dont redirect me to the app, but open the app in the browser.

I already update the urlscheme from config.xml, config.json,  updated the urlscheme from moodle (3.5). 

But nothing works.


This looks like https://tracker.moodle.org/browse/MOBILE-1908

But its not a bug ?


Thanks in advance.

pd. Sorry for my bad english.

 
Average of ratings: -
Picture of Dani Palou
Re: Moodle mobile, login SSO not returning to app
Core developersMoodle HQParticularly helpful MoodlersPlugin developers

Hi Dalberto,

I understand that this worked fine in the official Moodle app but it fails in your custom app.

How are you building the app? Are you using Phonegap Build or you compile it yourself?

Kind regards,

Dani

 
Average of ratings: -
Picture of Dalberto Doe
Re: Moodle mobile, login SSO not returning to app
 

Hi Dani,

I build the project, I also tried with phonegap-build, but it gave me an error in some dependency.

But now the browser redirection to app is working, using moodle mobile 3.5.2, but i have other problems.


 When i change the urlscheme from moodle, moodle mobile ( config.xml, src/config.json ) and build the project, after login in sso on browser, not return to app.

In the logcat i see some like this: 

"Navegacion Inaccesible: myurlscheme://token=XXXXXXXXXXXXXXXXXXX;" 

But urlscheme moodlemobile works fine.



PD. Since i disabled the local_mobile feature so, i should change the value from  wsextservice from local_mobile to a empty string ? 

Because ( i think) that causes that after logging me successfully, browser open the application and show me a message to login again.


I have also noticed that some login / token calls go to https: // www. instead of http://, I have looked at a similar problem in the forum, but they refer to a redirection configuration on the server, but that does not happen on my server, when I make the same request manually it does not redirect me.


 
Average of ratings: -
Picture of Dani Palou
Re: Moodle mobile, login SSO not returning to app
Core developersMoodle HQParticularly helpful MoodlersPlugin developers

Hi,

I think changing config.xml and src/config.json in the app, and then the setting in Moodle, should be enough to make it work (at least with Phonegap Build).

If you're generating the app in a local environment, you need to modify the config.xml file BEFORE running cordova prepare, since the URL_SCHEME is set when installing the plugin cordova-plugin-customurlscheme. You can also remove the plugin and add it again passing the scheme as a variable in the command:

cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=myscheme


The app should detect if the SSO needs to be performed using local_mobile or not. If core supports SSO login then the app should use it instead of local_mobile, regardless of the value in wsextservice.

When connecting to a site the app will always try to use https first. If it fails, then it will fallback to http. Once the app determines if the site uses http or https then it should always stick to that unless your site specifies a different httpswwwroot.

Cheers,

Dani

 
Average of ratings: -