MoodleMobile2 custom not working with SSO Shibboleth

MoodleMobile2 custom not working with SSO Shibboleth

by Angelo Calò -
Number of replies: 5
Picture of Plugin developers

Hello Friends,

I tried to setup custom Mobile App using the source code available on(https://github.com/moodlehq/moodlemobile2) and the guide  https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2

Everything ok with standard login but when i try shiboleth SSO  there is something wrong. My browser open new window (blank) with this url 

https://www.mymoodle.it/local/mobile/launch.php?service=local_mobile&passport=374.7395918660614


With the standard MoodleMobile2 application running fine.

Thanks in advance.

Angelo

Average of ratings: -
In reply to Angelo Calò

Re: MoodleMobile2 custom not working with SSO Shibboleth

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Angelo,

login via the browser only works in Mobile devices, you cannot simulate it using Chrome/Chromium because there is no way for making them to support custom URL schemes.

If you want to develop for the app, you should do the testing using normal user accounts.

Juan

In reply to Juan Leyva

Re: MoodleMobile2 custom not working with SSO Shibboleth

by Angelo Calò -
Picture of Plugin developers

Hi Juan,

I tried my custom app on mobile devices but i have the same problem.

Probably I have to set something else in my custom app...

I followed your guide

https://docs.google.com/presentation/d/1HX5h7zwtay4amaY3qyLuCLfI7kQCiD9IoWuDH-lSa_0/edit#slide=id.ga20278994_0_111 

to modify my custom app.

Maybe I need to change the custom URL schemes on my app or on the plugin on my moodle site.


Can You help me?

Many Thanks

Angelo

In reply to Angelo Calò

Re: MoodleMobile2 custom not working with SSO Shibboleth

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

yes, there is a problem with custom apps using custom URL schemes for SSO, we've fixed a couple of issues in both the local_mobile plugin and the app.

Basically, you have to change both the custom URL scheme in the local/mobile/launch.php file and in the app settings file (config.json).

Recently we've changed that in the local_mobile so you don't have to modify the code, we added a new parameter in the plugin settings, but that will be all released at the end of this month so I may suggest you to wait.

Juan

In reply to Juan Leyva

Re: MoodleMobile2 custom not working with SSO Shibboleth

by Angelo Calò -
Picture of Plugin developers

Hi Juan,

I tried to manually change the two files:

in mymoodle/local/mobile/launch.php I changed


// Redirect using the custom URL scheme.

$location = "Location: myapp://token=$apptoken";

header($location);

die;



in config.json in my custom app I changed


"customurlscheme": "myapp"


After this myapp opens the browser to the login SSO and then back to my app but without credentials... It ask me again moodleurl.

What's wrong? Where is my mistake?

Thanks

Angelo (sorry for my English and my insistence)



Average of ratings: Useful (1)
In reply to Angelo Calò

Re: MoodleMobile2 custom not working with SSO Shibboleth

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Angelo,

we'll be releasing the new version with this fixed in a few days (before the end of the month), I think it's better if you wait so you can try with the new versions of the local mobile plugin and the app

Juan

Average of ratings: Useful (1)