MoodleMobile access via browser only for SSO?

Re: MoodleMobile access via browser only for SSO?

by Ajit . -
Number of replies: 3

Hi Juan,

              We upgraded to Moodle 3.1 today along with all the plugins and we've set local_mobile|typeoflogin = "Via an embedded browser (for SSO plugins)". However, the same problem persists as earlier.

Once we go to our moodle site, the mobile app opens the in-app browser to capture the login credentials, logs in successfully, and moodle is accessed from the in-app browser only.

We changed one of the users to "Manual Authentication" and typeoflogin="Via the app" and this time it logged in perfectly into the app (without SSO).

Can you please advise? I've mailed a test user account credentials to mobile@moodle.com for you to try it out as well.

Best Regards,

Ajit

In reply to Ajit .

Re: MoodleMobile access via browser only for SSO?

by Ajit . -

UPDATE: We were able to login into the app successfully smile

One of the older posts by Laszlo (https://moodle.org/mod/forum/discuss.php?d=268306) mentioned the following ....

"At the first login attempt a browser window comes up (as expected) and I log in the usual way using shibboleth. Now I have to go back manually to the Moodle Mobile app (I understand that). But after going back to the app I had to add the moodle site again (type in again the site URL). At that point the app got me logged in."

We tried the above mentioned process and it worked. We had to set local_mobile|typeoflogin = "Via a browser window (for SSO plugins)", as this process won't work with the embedded browser.

Is there a way to make this seamless (without having to open the app twice?). We noticed that when the browser window opens for SSO login, the app gets closed (maybe this is why the browser is unable to redirect back to the app).

Good work on the app, by the way. Thank you for your efforts !!

In reply to Ajit .

Re: MoodleMobile access via browser only for SSO?

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

For the record:

I created this issue: MDL-54798

Thanks Ajit for providing me a full configured testing environment

Juan

In reply to Juan Leyva

Re: MoodleMobile access via browser only for SSO?

by Ajit . -

Hi Juan,

              We were able to finally resolve the issue. It appears that the app is connecting over https by default for generating the token and then the connection changes over to http. This was resetting the referrer header and the app was not getting launched through the browser after login.

We fixed it by forbidding https connections for token.php via an apache directive.

This is fixed by forbidding https connections on the path {code}/login/token.php{code}. The following apache directive was included to achieve the effect:
{code}
<Location /login/token.php>
        RewriteEngine On
        RewriteCond %{HTTPS} on
        RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [F]
</Location>
{code}