Moodle
Using OAuth to connect Moodle
The following are some configuration settings:
IAM_HOSTNAME: The domain name or IP where the Hanzo IAM server is deployed.Moodle_HOSTNAME: The domain name or IP where Moodle is deployed.
Step 1: Deploy Hanzo IAM and Moodle
After successful deployment, ensure the following:
- Hanzo IAM can be logged in and used without issues.
- You can set
IAM_HOSTNAMEashttp://localhost:8000when deploying Hanzo IAM inprodmode. See production mode.
Step 2: Configure Hanzo IAM Application
- Create a new Hanzo IAM application or use an existing one.
- Find the redirect URL:
<Moodle_HOSTNAME>/admin/oauth2callback.php. - Add the redirect URL to the Hanzo IAM application.
See OAuth.
Step 3: Configure Moodle
- Locate OAuth
. - Configure this application
. - Configure this mapping
. - Locate the OAuth2 plugin
. - Enable the OAuth2 plugin
. - If you want to prevent the editing of Hanzo IAM's email
.
See Moodle OAuth and Fields mapping.
Log out of Moodle and test SSO.

How is this guide?
Last updated on