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

Retrieve the private token when log-in via browser/embed to SSO sites (tool/mobile/launch.php)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.3
    • Fix Version/s: 3.2
    • Component/s: SSO (via local_mobile)
    • Labels:
    • Testing Instructions:
      Hide

      Right now the safest way to test this is to invalidate all the tokens before testing this. This should be fixed in MDL-56905.

      1. Configure a https 3.2 site (like qa.moodle.net) to use login via browser or embed browser. To do so, as admin go to Site administration > Mobile app > Mobile authentication.
      2. Install the app in a device. Please make sure you aren't logged in in the site in the device's browser.
      3. In the app, add the site so a browser or embed browser is opened.
      4. Authenticate in the browser and check that you're redirected and authenticated in the app.
      5. There are 2 ways to validate that everything worked fine:
        • Open Console and check that this code returns a token:

          var $mmSite = angular.element(document.querySelector('[ng-app]')).injector().get('$mmSite');
          $mmSite.getPrivateToken()
          

        • First of all, logout in your device's browser. Then in the app, open side menu and click "Website". Verify that you're authenticated in the site when it's opened in the browser.
      Show
      Right now the safest way to test this is to invalidate all the tokens before testing this. This should be fixed in MDL-56905 . Configure a https 3.2 site (like qa.moodle.net) to use login via browser or embed browser. To do so, as admin go to Site administration > Mobile app > Mobile authentication. Install the app in a device. Please make sure you aren't logged in in the site in the device's browser. In the app, add the site so a browser or embed browser is opened. Authenticate in the browser and check that you're redirected and authenticated in the app. There are 2 ways to validate that everything worked fine: Open Console and check that this code returns a token: var $mmSite = angular.element(document.querySelector('[ng-app]')).injector().get('$mmSite'); $mmSite.getPrivateToken() First of all, logout in your device's browser. Then in the app, open side menu and click "Website". Verify that you're authenticated in the site when it's opened in the browser.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Sprint:
      Moodle Mobile 3.2

      Description

      Once MDL-56737 is fixed we should be able to retrieve the private token

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Dec/16