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

Authentication: MFA is breaking the OAuth process in the mobile app

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE

      Steps to replicate:

      1. Install an email catcher. Example: Mailpit (https://github.com/axllent/mailpit)
      2. Login as admin.
      3. Enable tool_mfa.
      4. Enable at least one factor. Example: Email.
      5. Add below config to config.php
        • // Mailpit.
          $CFG->smtphosts = 'localhost:1025';
          $CFG->smtpsecure = '';
          $CFG->smtpauthtype = 'LOGIN';
          $CFG->smtpuser = '';
          $CFG->smtppass = '';  

      6. Navigate to Site administration > Plugins > Manage authentication.
      7. Make sure to enable the OAuth 2 plugin.
      8. Configure Google OAuth by following theĀ documentation
      9. Once you have the client ID and secret you can configure OAuth2 in Moodle by following theseĀ steps
      10. Open the Moodle app and add the Moodle site (LMS)'s URL. (You might need to public your local site with Ngrok).
      11. Tap on the Google authentication.
      12. (If you have more than one Google account you will need to select first which want you want to use).
      13. Complete the authentication process.

      Expected result:

      1. After all the authentication processes of Google are completed, you will be asked/redirected back to Moodle App.
      2. You will be logged in with an Oauth2 Google account in the Moodle App.

      Actual result:

      1. After all the authentication processes of Google are completed, you will stay forever in the device's browser. You will not be asked/redirected back to Moodle App.
      2. You cannot log in to Moodle App using the OAuth2 provider. In this case, it's Google.

            Unassigned Unassigned
            huongn@moodle.com Huong Nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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