Moodle
Casdoor can be used to connect Moodle using OAuth.
The following are some configuration settings:
CASDOOR_HOSTNAME
: The domain name or IP where the Casdoor server is deployed.Moodle_HOSTNAME
: The domain name or IP where Moodle is deployed.
Step 1: Deploy Casdoor and Moodle
First, deploy Casdoor and Moodle.
After successful deployment, ensure the following:
- Casdoor can be logged in and used without issues.
- You can set
CASDOOR_HOSTNAME
ashttp://localhost:8000
when deploying Casdoor inprod
mode. See production mode.
Step 2: Configure Casdoor Application
- Create a new Casdoor application or use an existing one.
- Find the redirect URL:
Moddle_HOSTNAME
/admin/oauth2callback.php. - Add the redirect URL to the Casdoor application.
For more information on OAuth, refer to 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 Casdoor's email .
For more information on Moodle, refer to Moodle and Fields mapping.
Log out of Moodle and test SSO.