Moodle Plugins directory: Discourse SSO: Versions: 1.0.0 | Moodle.org
Discourse SSO
Discourse SSO 1.0.0
DiscourseSSO Plugin
Overview
This plugin enables your Moodle installation to act as a SSO provider for Discourse. This allows single sign on between your Discourse and Moodle sites.
When a student is logged into your Moodle site and goes to your Discourse site, they can click "Log In" and will be automatically logged into Discourse; On first log in an account will be created in Discourse.
When a student is not currently logged into your Moodle site, they will be redirected to log into Moodle when they click "Log In" in Discourse.
Compatability
This plugin has been tested and is working on Moodle 3.2+.
Plugin Installation
Install the plugin following the directions from Moodle. The source can be obtained using two methods.
Git
If you have git installed, simply visit the Moodle /local directory and clone this repo:
git clone https://github.com/saylordotorg/moodle-local_discoursesso.git discoursesso
Download the zip
- Visit https://github.com/saylordotorg/moodle-local_discoursesso and download the zip.
- Extract the zip file's contents and name it 'discoursesso'.
- Place the folder in your /local folder, inside your Moodle directory.
Plugin Setup
The plugin needs to be set up on both the Moodle side and the Discourse side. The two need to share a unique sso secret, so create a random string that is 10 characters or longer. This string will be entered into both sites.
Discourse Setup
- Navigate to the Discourse admin dashboard and go to Settings->Login.
- Under the 'sso url' setting enter in "{your-moodle-url}/local/discoursesso/sso.php" substituting the base url of your Moodle installation for {your-moodle-url}.
- Under the 'sso secret' setting enter in the previously generated secret. Optional: The following settings are optional and may be checked: 1. sso overrides bio 2. sso overrides email 3. sso overrides username 4. sso overrides name 5. sso overrides avatar (Note: the DiscourseSSO plugin will not supply an avatar if the student does not have an avatar set in Moodle. This is to keep the default Discourse avatars if the avatar is not set - otherwise these students will have the generic Moodle avatar which does not look as good.)
Moodle Setup
- Navigate to the DiscourseSSO settings page from the administration block.
- Enter the previously generated secret into the "Shared SSO Secret Key" field. Make sure it matches the secret entered into Discourse!
- Enter your Discourse site URL into the "Discourse URL field"
Version information
- Version build number
- 2017052700
- Version release name
- 1.0.0
- Maturity
- Stable version
- MD5 Sum
- ac129caf41f8054d1207b54dbb0a8d08
- Supported software
- Moodle 3.2, Moodle 3.3
- The more recent release 1.4.0 (2020042400) exists for Moodle 3.2
- The more recent release 1.4.0 (2020042400) exists for Moodle 3.3
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
Default installation instructions for plugins of the type Local plugins
- Make sure you have all the required versions.
- Download and unpack the module.
- Place the folder in the "local" subdirectory.
- Visit http://yoursite.com/admin to finish the installation.