Moodle
Casdoor can use Oauth to connect Moodle.
The following are some of the names in the configuration:
CASDOOR_HOSTNAME
: Domain name or IP where Casdoor server is deployed.
Moodle_HOSTNAME
: Domain name or IP where Moodle is deployed.
Step1. Deploy Casdoor and Moodle
Firstly, the Casdoor and Moodle should be deployed.
After a successful deployment, you need to ensure:
- Casdoor can be logged in and used normally.
- You can set CASDOOR_HOSTNAME =
http://localhost:8000
. When deploy Casdoor inprod
mode. See production mode.
Step2. Configure Casdoor application
- Create or use an existing Casdoor application.
- Find a redirect url:
Moddle_HOSTNAME
/admin/oauth2callback.php - Add your redirect url to casdoor application
More infomation for OAuth
Step3. Configure Moodle
- You should find OAuth
- You should config this app
- You should config this Mappling
- Find OAuth2 plugin
- Enable OAuth2 plugin
- if you want Casdoor's email can't be edited
More infomation for Moodle and Fields mapping
Log out of Moodle, and test SSO.