Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4780

Moodle mobile app on Linux does not work with SSO

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 4.5.0
    • Authentication
    • MOODLE_405_STABLE

      Moodle Desktop has been discontinued in favor of the Moodle Mobile app, so I tried to use it on a Linux desktop (Debian 12). I followed the instructions at
      https://moodledev.io/general/app/development/development-guide
      (cloned repository, git checkout v4.5.0, installed node 20.18.1, created unsafe-chromium.sh and pointed MOODLE_APP_BROWSER to it). Then I ran the app through "npm start". It takes a while for the interface in Chromium to become functional, but it gets there.

      The problem begins when I try to connect to my institution's Moodle service. I enter the URL to the site, the app recognises it and tries to connect, but after waiting a bit I only get

      Error code: serverconnectionajax
      Error connecting to the server: [Response status code: 0] Unknown error.

      I think that it should work because the Mobile app installed on my Android phone can connect. When connecting there I'm presented with my institution's SSO prompt, I enter username, password, and an OTP, and then I have access. It is this login process which seems to fail. SSO is provided by Microsoft and seems to use SAML2.

      I opened the Developer tools in Chromium showing the web app, and there are a number of error messages, e.g.:

      at site: 1

      Access to XMLHttpRequest at 'https://MOODLESERVER/lib/ajax/service.php?info=tool_mobile_get_public_config&lang=en_us' from origin 'https://localhost:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
      

      at ws.ts: 1265

      POST https://MOODLESERVER/lib/ajax/service.php?info=tool_mobile_get_public_config&lang=en_us net::ERR_FAILED 200 (OK)
       
      Mixed Content: The page at 'https://localhost:8100/login/site?showKeyboard=undefined' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://MOODLESERVER/lib/ajax/service.php?info=tool_mobile_get_public_config&lang=en_us'. This request has been blocked; the content must be served over HTTPS.
       
      POST https://MOODLESERVER/lib/ajax/service.php?info=tool_mobile_get_public_config&lang=en_us net::ERR_NAME_NOT_RESOLVED
      

            Unassigned Unassigned
            Allefeld Carsten
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.