Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76671

Mandatory policies for new users are breaking the OAuth process in the mobile app

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-76671-403
    • MDL-76671-master
    • Hide

      On the Moodle site (LMS) as a site administrator:

      1. Login as admin.
      2. Navigate to Site administration > Plugins > Manage authentication.
      3. Make sure to enable OAuth 2 plugin.
      4. Add a site policy (Site administration > Users > Privacy and policies > Policy settings). It can be either 'Default (core)' or 'Policies (tool_policy)' as it happens on both.
      5. Configure Google OAuth by following the documentation
      6. Once you have the client ID and secret you can configure OAuth2 in Moodle by following these steps

      On a mobile device using the mobile app:

      1. Open the Moodle app and add the Moodle site (LMS)'s URL
      2. Tap on the Google authentication
      3. (If you have more than one Google account you will need to select first which want you want to use)
      4. Accepts the pending policy(ies) in the browser
      5. Confirm that:
      6. The app re-launches and you are authenticated into the site

       

      Show
      On the Moodle site (LMS) as a site administrator: Login as admin. Navigate to Site administration > Plugins > Manage authentication. Make sure to enable OAuth 2 plugin. Add a site policy (Site administration > Users > Privacy and policies > Policy settings). It can be either 'Default (core)' or 'Policies (tool_policy)' as it happens on both. Configure Google OAuth by following the documentation Once you have the client ID and secret you can configure OAuth2 in Moodle by following these steps On a mobile device using the mobile app: Open the Moodle app and add the Moodle site (LMS)'s URL Tap on the Google authentication (If you have more than one Google account you will need to select first which want you want to use) Accepts the pending policy(ies) in the browser Confirm that: The app re-launches and you are authenticated into the site  

      The OAuth process launched by the app does not complete (the user is able to log in but it is not redirected back to the app) when new policies requiring agreement are added to the site. This could also happen the first time they access to the site if there is a mandatory license.

      I've reproduced this with new users but I think it would happen the same for existing policies when a new mandatory policy is added to the site.

      There is a more detailed description here: MOBILE-4078

      Reproduction steps
      On the Moodle site (LMS) as a site administrator:

      1. Add a site policy (Site administration > Users > Privacy and policies > Policy settings). It can be either 'Default (core)' or 'Policies (tool_policy)' as it happens on both.
      2. Configure Google OAuth
      3. Create a user account with OAuth2 authentication method, use a Google account email. (You need to be able to log in using that account.)

      On a mobile device:

      1. Open a browser and log in on that Google account
      2. Open the the Moodle app and add the Moodle site (LMS)'s URL
      3. Tap on the Google authentication
      4. (If you have more than one Google account you will need to select first which want you want to use)
      5. Accepts the pending policy(ies) in the browser
      6. You will see an error message and you will NOT be redirected back to the app

      Workaround: Change the Type of login (tool_mobile | typeoflogin). Site administration > Mobile app > Mobile authentication, to via a browser window or via an embedded browser. (For more information please visit the Moodle app guide for admins - Mobile authentication: SSO authentication method.)

            jleyva Juan Leyva
            jleyva Juan Leyva
            Rodrigo Mady Rodrigo Mady
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours, 10 minutes
                1d 4h 10m

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