Single Sign On

Access WordPress and Moodle with single user credential

2

Single Sign On for Edwiser Bridge

We like EASY, and Single Sign On for Edwiser Bridge is an extension in exactly that direction. Developed for the WordPress Moodle Integration system the extension provides end users with an option to enter a single username and password on the WordPress website and gain access on WordPress as well as Moodle simultaneously.

PLUGIN DETAILS

Current Version 1.3.2

COMPATIBILITY DETAILS

WordPress Version 4.4.2 up to 4.9

Edwiser Bridge Version 1.3.3

WooCommerce Version 2.5.5 up to 3.2.6

Moodle Version 3.0.3 up to 3.5.2

PHP version 5.6 up to 7.2

PRICING

Buy Now

Note: This plugin is an extension of Edwiser Bridge (WordPress Moodle Integration) which is available for free on wordpress.org. Edwiser Bridge needs to be activated on your website for the extension to work.

Features


Simultaneous Login

The Single Sign On Extension for Edwiser Bridge provides users with an option to enter the login credentials once in WordPress and be logged in to Moodle simultaneously.

Simultaneous Logout

Just like simultaneous login the Single Sign On Extension provides users with an option to be logged out of WordPress & Moodle simultaneously from the WordPress website.

Social Login

Social Login Feature of the Single Sign On plugin empowers your users to directly register on WordPress and Moodle simultaneously using their Google or Facebook account

Reverse Login

The Single Sign On Extension for Edwiser Bridge provides users with an option to enter the login credentials once in Moodle and be logged in to WordPress simultaneously.

Reverse Logout

Just like reverse login the Single Sign On Extension provides users with an option to be logged out of WordPress & Moodle simultaneously from the Moodle website.

Translation Ready

Need to display the Single Sign On plugin in a language of your choice? Include the necessary translation files to the plugin and you are good to go!

Documentation


Single Sign On Extension Installation on WordPress

NOTE: Make sure that your PHP is version 5.6 or greater.

  • Upon purchasing the Single Sign On Extension for Edwiser Bridge, an email containing the purchase receipt, download links, and license key will be sent to your registered email id. You can download the extensions using the download link provided.
  • The email contains the download links for two zip files – ‘edwiser-bridge-sso.zip’  and ‘wdmwpmoodle.zip’.
  • The ‘edwiser-bridge-sso.zip’ is the plugin file that has to be installed on the WordPress website.
  • To install this plugin, go to the ‘Plugins’ menu from the dashboard.
  • Click on the ‘Add New’ button on this page.
  • Now click on the ‘Upload Plugin‘ button and upload the ‘edwiser-bridge-sso.zip’ file.
  • Click on ‘Install Now’ button once you have located and uploaded the plugin.
  • On successful installation click the ‘Activate Plugin’ link to activate the plugin.
  • Alternatively, you can unzip and upload the Single Sign On Extension plugin folder using the FTP application of your choice.

[ NOTE: While upgrading the Single Sign-On plugin, please make sure that after you have completed upgrading the SSO file in WordPress, you upgrade the ‘wdmwpmoodle.zip’ file on Moodle too. ]

License Key Activation

  • Once you have activated the plugin go to Edwiser Bridge > Settings > “Licenses” tab.
  • A new option labeled as ‘Single Sign On License’ will be created under this tab.
  • Enter the license key provided in the purchase email in the ‘License Key’ field and click the ‘Activate License’ button.

edb-sso-license

Note:

  • Every license issued is a single site license. You cannot use it on more than one website simultaneously.
  • If you need to migrate the plugin from your staging site to your live site you will have to first deactivate license key from the staging site and then use the same key on the live site.

Single Sign On Extension Installation on Moodle

  • The ‘wdmwpmoodle.zip’ file will have to be installed on the Moodle website.
  • To do so you will have to log in to the Moodle website and navigate to ‘Site Administration’ -> ‘Plugins’ -> ‘Install Plugins’.
  • Once here upload the ‘wdmwpmoodle.zip’ file using the ‘Choose a file’ button alongside the ‘Zip package’ field.
  • Choose ‘Authentication method (auth)’ from the drop-down list provided against the ‘Plugin type’ field. The ‘Rename the root directory’ field can be left blank.
  • Now click the ‘Install plugin from the ZIP file’ button.

[ NOTE: For the users who are upgrading the ‘wdmwpmoodle.zip’ file for the latest version of Single Sign-on (SSO v1.3.2) please upload the extracted version of ‘wdmwpmoodle.zip’ file in the ‘auth‘ folder of the Moodle directory using FTP ]

single-sign-on-extension-moodle-installation

  • Enable the Single Sign On extension on Moodle by navigating to ‘Site Administration’ -> ‘Plugins‘ -> ‘Authentication’ -> ‘Manage Authentication’ and enable the Edwiser Bridge SSO plugin.

single-sign-on-extension-moodle-enable

  • The last step in the installation process of Single Sign On is adding the “wdm_sso_verify_token” service in your external service. To do so, go to ‘Site Administration’ -> ‘Plugins‘ -> ‘Web Services‘ -> ‘External Services‘. Here, click on the “Functions” button beside the external service which was earlier created for Edwiser Bridge. Click on “Add Functions” and search and add the “wdm_sso_verify_token” service in this list.

Single Sign On Extension User Guide

Defining a Secret Key on WordPress and Moodle

  • Once you have installed the extension on WordPress as well as Moodle on both the websites a secret key will have to be set that will facilitate the Single Sign-On process.
  • To set the secret key on the WordPress website navigate to ‘Edwiser Bridge‘ -> ‘Settings‘ -> ‘Single Sign On‘ tab from the admin menu and set a secret key of your choice in ‘Secret Key‘ inside the general tab.
  • Now the same secret key should be set on the Moodle website. To set the secret key on Moodle, log in to your Moodle website and navigate to ‘Site Administration‘ -> ‘Plugins‘ -> ‘Authentication‘ -> ‘Edwiser Bridge SSO‘. On clicking ‘Edwiser Bridge SSO‘, the following screen will appear on the right side of your screen.

 

  • Here you will have to enter the same secret key that you entered in the ‘Secret Key‘ field in the Single Sign-On settings on the WordPress website and save the settings.

Important Note: The SAME secret key MUST be defined on both the WordPress and Moodle websites for the Single Sign On functionality to work seamlessly without any errors.

Including a Login Link on the WordPress Website with a Shortcode

  • The Single Sign On extension for Edwiser Bridge allows users to enter their login credentials once in WordPress and be logged in to WordPress and Moodle simultaneously.
  • Now it can happen that an end user logs out of the Moodle website. For these users, you can provide a login link on the WordPress website which can be used to automatically login to the Moodle website again without having to enter any login credentials.
  • To use the shortcode on your WordPress website create a page and add this shortcode to the page.

single-sign-on-extension-moodle-generate-link

  • Now use the link of the page that you just created to any menu item that you might want to use to automatically login the user to Moodle and redirect them there.

Setup WordPress log in redirection:

  • If you want your users to redirect to Moodle site as soon as they log in from your WordPress site using the WooCommerce My Account login page (www.example.com/my-account), then, go to Edwiser Bridge → Settings → Single Sign On Tab and add your Moodle site’s address or a WordPress page which consists the [wdm_generate_link] shortcode.

Setup Reverse SSO (Automatic login/logout on WordPress site if a User logs in/logs out on Moodle):

  • Go to your Moodle site and browse Site Administration → Plugins → Authentication → ‘edwiser bridge sso’. Here, add the complete WordPress site URL in the following section.

Moodle logout Redirection:

  • If you want your users to redirection to a certain page after he logs out of Moodle, then please add the logout redirection URL in the following section.

Note: Make sure that you have set these things before using SSO plugin.

  • Make sure that the mcrypt extension is enabled in both WordPress as well as Moodle site.
  • You should also set the permissions for auth/wdmwpmoodle file that needs to be uploaded to Moodle site as follows,

– The folder and sub-folder permission need to be set to 755.

– The sub-files permission needs to be set to 644.

Social Login

You can enable social login feature in the plugin which empowers your users to register directly on your site by clicking on Facebook or Google+ login button visible on the login/registration page. As soon as they click on either of these buttons, their user account is created on WordPress and Moodle.

System Requirements:

PHP Version: Minimum: PHP 5.6+

Recommended: PHP 7.2

Social Login options on login page

Google+ Login

In your WordPress backend, browse Edwiser Bridge → Settings → Single Sign On Tab. Here, in the Social Login settings, choose the page where you want to display the Google plus login.

This step involves creating a Google API Console project, generating OAuth 2.0 client ID and registering your JavaScript origins. Please follow the steps below:

  1. Go to the Google API Console.
  2. From the project drop-down, select an existing project, or create a new one by selecting Create a new project.
  3. In the list of services, search and select the Google+ API service. Press the ‘Enable’ button and wait till it is enabled.
  4. Now, browse your left hand side menu and select the ‘Credentials’ tab. Under this tab, select OAuth Consent screen tab. Choose an email address, specify the application name, authorized domains and save the changes.
  5. In the Credentials tab, click on create credentials drop-down list, and choose ‘OAuth client ID’.
  6. Select Web Application as your Application type. Define a name and enter the origin of your app in the Authorized Javascript origins field. You may enter multiple origin to support different domains, subdomains, etc. Add your WordPress URL in Authorized Redirect URLs.
  7. Press the Create button.
  8. The client ID and Client Secret is now successfully created. Copy and keep this code as backup. Also, copy the application name as well.
  9. Copy the client ID, Secret Key, and the application name and paste it in the Single Sign On Social Login Settings page and save the changes.

Facebook Login

In your WordPress backend, browse Edwiser Bridge → Settings → Single Sign-On Tab. Here, in the Social Login settings, choose the page where you want to display Facebook login.

Step 1: Create an Application in your Facebook Developer Account
In order to generate application ID and Secret Key, please follow the steps below.

  1. Log into your Facebook Developer account by clicking here.
  2. Click on the ‘Create App ID’ in the top right corner of the page.
  3. Define the name of the application, enter your email address and click on Create App.

Step 2: Register your Product
After creating an application, you will be directed to a page where you can register your product. Here, please follow the steps below.

    1. In ‘Facebook login’ option, click the ‘Setup’ button

    2. Choose ‘Web’ as the platform.
    3. Enter your site URL and click on Save and Continue button.

Step 3: Enter Redirect URI

    1. Click on the settings link inside the Facebook login Tab on the Left Sidebar.

    2. Enter the Redirect URI, preferably the link of your homepage. Please make sure that you add ‘/?action=facebook_login‘ to your WordPress URL

      [ NOTE: “Enforce HTTPS” is automatically enabled, hence you will have to use HTTPS only, HTTP:// won’t work ]

Step 4: Create an Application in your Facebook Developer Account

  1. Now, Go to the ‘Settings’ tab on the left sidebar and select the ‘Basic’ option. Add your site domain and sub-domains to the ‘App domain’ box and your privacy policy URL to the ‘Privacy Policy URL’ box, then fill out all other details asked below.
  2. To publish this application, click on the App Review Tab on the left sidebar. Now, slide the option to ‘Yes’, choose the appropriate category and click on the ‘Publish’ button.

Step 5: Retrieve App Id and Secret Key

After publishing the app, go back to the ‘basic settings’ page and retrieve the App ID and the Secret Key.

Copy and paste the App ID and the Secret key in Social Login settings and Save the Changes.

 

User Role Based Redirection

If you want to redirect users to a specific page based on their role, then browse Edwiser Bridge → Settings → Single Sign On → Redirection and enable the ‘User Role Based Redirection’ option. Select the User Role in the Role Dropdown and enter the URL of the location where you wish to redirect the users with this user role. Click on Add button and Save the changes when done.

Shortcodes

ShortcodeDescription
[wdm_generate_link]Include this shortcode in a WordPress page to redirect a user to Moodle Dashboard when they click on this page’s link.
[eb_sso_social_login]Use this shortcode to add the Facebook and Google social login icons in your login box or a page.

Hooks and Filters

HookDescriptionParameters
eb_sso_login_urlUse this filter to redirect a user to a specific page after logging in to the WordPress website.$url: URL of th page you want to redirect the user to after logging in to the WordPress website
eb_sso_logout_urlUse this filter to redirect a user to a specific page after logging out from the WordPress website.$url: URL of th page you want to redirect the user to after logging out from the WordPress website

Last Update on 15th December 2017

= 1.3.1 =
* Fix – Unable to update Secret Key.

= 1.3.0 =
* Feature – Functionality for user role-based redirection.
* Feature – Settings for user role-based redirection enable/disable.
* Feature – Setting for social login enable & disable.
* Feature – Functionality for register and login user using Google plus.
* Feature – Functionality for register and login user using Facebook.
* Feature – Added Shortcode [eb_sso_social_login] to add the social login buttons on any page.
* Tweak – Split the setting into tow parts (Redirection/General) settings.
* Tweak – Split the settings code into tow parts.
* Fix – Reduced the number of request set for the secrete key check.
* Fix – Various performance improvement.

= 1.2.1 =
* Feature – Compatibility with Moodle 3.3 and above.
* Tweak –  Single Sign On WordPress settings moved from General Settings to Connection Settings page of Edwiser Bridge plugin.
* Fix – Updated License code.
* Fix – SSO Settings in Moodle plugin not visible on Moodle version 3.3 and above.

= 1.2 =
* Feature – Trigger WordPress login when users logs into moodle.
* Feature – Trigger WordPress logout when users logs out from moodle.
* Feature – Moodle dashboard setting to redirect on a specific page after logout.
* Feature – WordPress dashboard setting to redirect on a specific page after login.
* Feature – Translation ready.
* Feature – Added a button in Dashboard to verify WordPress Secret Key with Moodle Secret Key.
* Tweak – Optimized plugin.
* Tweak – Updated licensing code.
* Tweak – If query argument `redirect_to` or `redirect` is set in login URL, then redirect users to that specified URL.
* Tweak – WooCommerce MyAccount page login – redirect to the same page itself i.e. MyAccount page.
* Fix – Users redirecting to Homepage when they log in on WooCommerce’s checkout page.
* Fix – Notice “undefined constant HTTP_REFERER”
* Fix – Even after saving Secret Key at moodle end, it does not show the entered secret key.

= 1.1.0 =
* Tweak – Single Sign On license key presented inside the “licenses” tab in Edwiser Bridge
* Tweak – Refactored & optimized whole plugin codebase using tools like PHPCS, PHPCBF & PHPMD.

= 1.0.0 =
* Plugin Launched

Bruno Rodrigo Souza

It resolved all my needs. Thank you!

  • Single Sign On

Want to Speed Up the Setup? We can Help!

Frequently Asked Questions


I am Interested in the Single Sign On Extension

Which version of WordPress does the Single Sign On extension work with?

The Single Sign On Extension extension requires at least WordPress version 3.0.1 and has been tested up to the version stated under the plugin details.

Are there any prerequisites for the installation of the extension?

Single Sign On is an extension of the Edwiser Bridge plugin. Hence, the Edwiser Bridge plugin will have to be installed on your website before you get started. You can download your free copy of Edwiser Bridge from wordpress.org.

Do you have a refund policy?

Please refer to the Terms and Conditions to know more about our refund policy.

Suggest some sites where I can understand the working of Edwiser Bridge and its extensions.

You could try these sites to experience the working of Edwiser Bridge and its extensions.

I have some license related questions

What is your license policy?

Every license you purchase is valid for one year, during which you will receive free support and updates. After the license expires you will still be able to use the plugin, but will not receive support or updates. To continue receiving support and updates, you will have to renew the license of the plugin.

How many sites is the license valid for?

The license for the Single Sign On extension is valid only for a single website.

Do I have to use the license key for the extension that will be installed on Moodle?

No. The license key that is provided in the purchase receipt is only for the plugin that will be installed on WordPress.

The license is active on the staging site. I now want to activate it on my live site. What should I do?

Each license can be used only on a single website. If you are already using the license on your staging site and want to now use it on your live site, go to Plugins –> Single Sign On License and deactivate the plugin from your staging site. Now use the same license key on your live site.

Where should I enter the license key that I have received in the purchase receipt?

The license key is associated with the Single Sign-On extension that will be installed on the WordPress website. To enter the license key here you will have to navigate to ‘Plugins‘ -> ‘Single Sign On License‘ in the admin menu of your WordPress website.

My license key is not activated?

Sometimes the license key does not get activated because the ” curl_exec ” PHP file is not enabled in your WordPress. Once you have enabled this file your license key will be activated.

I am Using the Single Sign On Extension

The single sign on functionality is not working on my website. What should I do?

There could be two possible reasons for this to happen:

  1. You have not set the secret key on WordPress and Moodle: If this is the case then refer to the documentation to learn how to set the secret keys on both websites.
  2. You do not have the mcrypt extension activated on both WordPress and Moodle: Install and enable mcrypt extension on both websites to resolve this issue.
  3. The issue could be due to file permissions related to the directory and files in SSO. (Ideally, the “Directory” access permission should be set at 755 and the “Files” access permission should be set at 644)

Make LOGIN SIMPLE with the Single Sign On Extension for Edwiser Bridge