Skip to main content

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:

  1. Casdoor can be logged in and used normally.
  2. You can set CASDOOR_HOSTNAME = http://localhost:8000. When deploy Casdoor in prod mode. See production mode.

Step2. Configure Casdoor application

  1. Create or use an existing Casdoor application.
  2. Find a redirect url: Moddle_HOSTNAME/admin/oauth2callback.php
  3. Add your redirect url to casdoor application

More infomation for OAuth

Step3. Configure Moodle

  1. You should find OAuth Find_OAuth
  2. You should config this app configure
  3. You should config this Mappling Mapping
  4. Find OAuth2 plugin plugin
  5. Enable OAuth2 plugin Enable
  6. if you want Casdoor's email can't be edited Fields

More infomation for Moodle and Fields mapping

Log out of Moodle, and test SSO. Login