Moodle for mobile

Mobile app not redirecting to app after SSO login via embedded browser

 
Picture of Todd Weller
Mobile app not redirecting to app after SSO login via embedded browser
 

Hi there,

I've just downloaded the latest Moodle Mobile additional features plugin (as 2 Mar 2017) for a Moodle 3.0 site. This is the 2nd site I've setup for the mobile app and everything was going smoothly until I attempted to login. 

After logging in via the embedded browser (SSO), I am successfully logged in but remain in the embedded browser and see the normal browser based site, rather than being re-directed back to the Moodle App. 


Any thoughts on why this may be happening and how to fix it?\


Thanks in advance,

Todd

 
Average of ratings: -
Picture of Hittesh Ahuja
Re: Mobile app not redirecting to app after SSO login via embedded browser
Plugin developersTesters

This is done via the url scheme. Make sure your url scheme matches your app id and is unique in config.xml or config.json.


Hittesh Ahuja

 
Average of ratings: -
Picture of Hittesh Ahuja
Re: Mobile app not redirecting to app after SSO login via embedded browser
Plugin developersTesters

*not matches exactly but relative to the app id. Sorry

 
Average of ratings: -
Picture of Todd Weller
Re: Mobile app not redirecting to app after SSO login via embedded browser
 

Hi Hittesh, thanks for the reply. 


Unfortunately I am just working on the front end of the moodle site and don't have access to the back end files. I managed to setup the Moodle Mobile app on a Moodle site running 2.6. This current one is running 3.0. Would that have any impact on this issue? 

Is there a way to do or work around for your suggestion just using the main front-end interface by any chance?


thanks again-

Todd

 
Average of ratings: -
Picture of Valery Fremaux
Re: Mobile app not redirecting to app after SSO login via embedded browser
 

Experiencing same behaviour her. The app leaves to a browser and actually never comes back. There is a documentation hole on that point. I do not ever know where to search those config.xml or config.json mentionned in the track.

Doc says :

"When using the "Via a browser window" option, you can optionally specify an URL scheme to be used by the system to open the Mobile app. By default, the URL scheme used to open the app will be the one indicated by the own app during the SSO process. If you've developed a custom app using its own URL scheme and you want to allow only SSO logins via your app, you can indicate there an URL scheme. The site will detect that setting and will use it instead of the value indicated by the app."

Which sound a bit opaque to me. I am using the standard Moodle Mobile app so i'm just assuming that i would not have to care to that URL, but maybe i'm wrong. In that case, the definition of this url is a bit esoteric : "the one indicated by the own app during the SSO process"  ? hum.... i do not see even what it points to...

 
Average of ratings: -
Picture of Juan Leyva
Re: Mobile app not redirecting to app after SSO login via embedded browser
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Hi,

we'd need to know:

* Your Moodle version

* Your Moodle Mobile version

* The SSO auth plugin configured in your site

* If your are testing with the official app or a custom app

Regards, Juan

 
Average of ratings: -
Picture of Todd Weller
Re: Mobile app not redirecting to app after SSO login via embedded browser
 
Hi Juan,


Thanks for the reply. 


Moodle version: Moodle 3.0.7+ (Build: 20161202)

Moodle Mobile: 3.2.1 (2 mar 2017)

SSO auth plugin: SAML Authentication

Official app- no custom app. 


cheers!

Todd

 
Average of ratings: -
Picture of Andrew Clucas
Re: Mobile app not redirecting to app after SSO login via embedded browser
 

I am really interested in this answer as well Todd. At World Vision International we have Moodle 3.1.5+. It works well with the Moodle Mobile app when users login with a manual account. However, the vast majority of our users login using SAML to authenticate and I am not sure how to allow the SAML users to access our Moodle via the Moodle Mobile App.

Cheers

Andrew

 
Average of ratings: -
Picture of Juan Leyva
Re: Mobile app not redirecting to app after SSO login via embedded browser
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Hi,

for enabling access for sites using SSO methods you need to install this plugin:

https://docs.moodle.org/32/en/Moodle_Mobile_additional_features#Features

Although in 3.2 is supported natively

Juan

 
Average of ratings: -
Picture of Todd Weller
Re: Mobile app not redirecting to app after SSO login via embedded browser
 

HI Juan, 


Thanks for the reply. I've had Moodle Mobile 3.0.321 (2015111114) installed since before trying all this and am still getting the same series of events... 

1) Open app

2) Add site

3) New window pops up with login area

4) Login

5) Taken straight to Moodle site via the same browser window and not back to the app

6) app never saves the site

Not sure what else there is to try? 


-Todd


 
Average of ratings: -
Picture of Juan Leyva
Re: Mobile app not redirecting to app after SSO login via embedded browser
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Hi,

what SSO auth plugin are you using? Is an official one or a third party one?

Most of the time, if the SSO doesn't work, is because you are using a contributed auth plugin not handling correctly the $SESSION->wantsurl code

Juan

 
Average of ratings: -
Picture of Valery Fremaux
Re: Mobile app not redirecting to app after SSO login via embedded browser
 

Hi Juan

at the moment seems i'm still stuck on this topic too. The CAS plugin we are using in both case is a cloned from auth/cas with only some local changes on logout and failure redirections, or in an other case with additional CAS ticket attributes.

Is the fact that the plugin is not strictly "auth/cas" affect the ability to turn back to the app mode ?

(in both case, $SESSION->wantsurl is working as usual)

 
Average of ratings: -
Picture of Juan Leyva
Re: Mobile app not redirecting to app after SSO login via embedded browser
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Hi Valery,

the CAS plugin works perfectly but we've seen that some customizations are not working as expected because some times important lines are changed or some values are harcoded.

Can you send me via private message or to mobile@moodle.com the url of your site? If local_mobile is installed there I can do a quick test to check if the cas plugin is working as expected

Juan

 
Average of ratings: -
Picture of Valery Fremaux
Re: Mobile app not redirecting to app after SSO login via embedded browser
 

Hi Juan

I will prepare some test data and available test plants.

We were just commenting upon the topic with Martin at last French MoodleMoot.

Our academic deployment is at the moment (for this year) still running moodle 3.1 as we have a big set of plugins to check for upper branches and focussing around 700.000 students upon 510 moodle instances.

Cheers !

Valery

(In Madrid / San Lorenzo del Escorial at the moment)



 
Average of ratings: -
Picture of Valery Fremaux
Re: Mobile app not redirecting to app after SSO login via embedded browser
 

Our first deployment in PACA (Nice Aix Marseille) has 170 instances

Our testing instance, fully functionnal is :

https://lgt-atrium-13008-moodle-recette.atrium-paca.fr

I send you typical test user credential in private message.

local_mobile is installed and enabled.

The platform runs an auth/casent CAS based plugin wich changes some details on logout. It keeps the authCAS=CAS / authCAS=NOCAS mechanism and the $SESSION->wantsurl handling.

I will next foward you our second deployment target over 340 intances

Valery

(Still in El Escorial, Madrid)

 
Average of ratings: -
Picture of Juan Leyva
Re: Mobile app not redirecting to app after SSO login via embedded browser
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters
Hi Valery,

I can't log-in using the credentails you sent me. Could you confirm that the credential form is the one in this link? --> Pour vous connecter à ce service, veuillez vous authentifier sur le portail ATRIUM en suivant ce lien : Connexion ATRIUM

Apart from that, I can't contact you via private messages (you have it configured to accept messages only from your contacts)

Juan
 
Average of ratings: -
Picture of Valery Fremaux
Re: Mobile app not redirecting to app after SSO login via embedded browser
 

Actually you're right, our integration operator is having some trouble with the underlying ldap server at the moment. I'm stucked also with account feeders on the integration moodles.

I opened the private message channel no to bother community with our local tests.

Cheers.

Valery.

 
Average of ratings: -
Picture of Juan Leyva
Re: Mobile app not redirecting to app after SSO login via embedded browser
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Hi,

I just added this page in the FAQ https://docs.moodle.org/33/en/Moodle_Mobile_FAQ#SSO_is_not_working_with_my_custom_auth_plugin explaining what may be happening.

Juan

 
Average of ratings: -
Picture of Esther I.K
Re: Mobile app not redirecting to app after SSO login via embedded browser
 

Hi!

I experienced same case, after I login in browser website, it does not redirect to the mobile app. 

I have read your page in FAQ: Custom auth plugins may be failing in the last step,not redirecting back to local/mobile, this will happen only if the plugin does not support correctly the $SESSION->wantsurl.

Could you please explain more about this? How do I know whether the plugin does/doesn't support the $SESSION->wantsurl? And how do I correct that (if that was the case)?


We will launch mobile app for the new semester, so any help would be really appreciated!


Thanks!

 
Average of ratings: -