-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
4.2.5, 4.3.2
-
MOODLE_402_STABLE, MOODLE_403_STABLE
Steps to replicate:
- Install an email catcher. Example: Mailpit (https://github.com/axllent/mailpit)
- Login as admin.
- Enable tool_mfa.
- Enable at least one factor. Example: Email.
- Add below config to config.php
-
// Mailpit.
$CFG->smtphosts = 'localhost:1025';
$CFG->smtpsecure = '';
$CFG->smtpauthtype = 'LOGIN';
$CFG->smtpuser = '';
$CFG->smtppass = '';
-
- Navigate to Site administration > Plugins > Manage authentication.
- Make sure to enable the OAuth 2 plugin.
- 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
- Open the Moodle app and add the Moodle site (LMS)'s URL. (You might need to public your local site with Ngrok).
- 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).
- Complete the authentication process.
Expected result:
- After all the authentication processes of Google are completed, you will be asked/redirected back to Moodle App.
- You will be logged in with an Oauth2 Google account in the Moodle App.
Actual result:
- 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.
- You cannot log in to Moodle App using the OAuth2 provider. In this case, it's Google.