Single sign-on for Drupal sites

This page explains how to integrate a SuperSaaS schedule into a Drupal based website so that your users only need to sign in once to access both your website and the SuperSaaS schedule within it. To be able to use it you first need to sign up for a (free) SuperSaaS account.

If you do not ask your users to log in to your own website, you should follow the general instructions on how to integrate a schedule in your website. The module provided here will only work when the user is already logged into your own Drupal site.

Using Drupal login names for your SuperSaaS schedule

The SuperSaaS Drupal module displays a “Book now” button that automatically logs the user into a SuperSaaS schedule using his Drupal username. If you are not using the Drupal user registration system, then you should instead follow the general instructions on how to integrate a schedule in your site.

The button generated by the module passes the Drupal user database information along to SuperSaaS, creating the user in the SuperSaaS database or updating his information as needed. This saves users from having to create a separate login for the booking system and avoids the need to log in twice.

Installation and setup of the module in Drupal

  1. Install the module (Drupal 8, 9 & 10). In your Drupal administration menu, click Extend and then click “+ Install new module”. In the box Install from a URL, put (Drupal 8/9/10) and click the Install button. Next, on the Extend page, check the box next to the module name to enable it and click Save configuration. Now expand the section next to the module name and click the Configure option next to the module name to set it up. Fill in or clear the fields and check/uncheck ‘Enable HTTPS’ according to your settings.

    Install the module (Drupal 7). In your Drupal administration menu, click Modules and then click “+ Install new module”. In the box Install from a URL, put (Drupal 7) and click the Install button. Next, on the Modules page, check the box next to the module name to enable it and click Save configuration. Now click the Configuration option next to the module name to set it up.

    Install the module (Drupal 6). First download the Drupal 6 module. Unzip the module and upload it to your Drupal site into the directory sites/all/modules. Next, on your Drupal administrator page, go to Administer>Site building>Modules, check the box next to the module to enable it and click Save configuration. Now go to Administer>Site Configuration>SuperSaaS Settings to set up the module.
    Enable Drupal module
  2. Set up the module. Go to fill out the SuperSaaS Settings screen:
    • SuperSaaS account name – This is the name of your account (not your email address)
    • SuperSaaS API key – You can find the API key of your SuperSaaS account at the bottom of the Account Info page.
    • Schedule name – You can either put the name of a schedule or you can provide a full URL if you want to add specific parameters to direct the user to a specific view. If you are using more than one schedule, see below.
    • Button Label – The button label. This defaults to “Book Now” or its equivalent in the supported languages. If the button has a background image, this will be the alternate text value.
    • Button image – The URL of the background image. This has no default value. So, the button will not have a background image, if this isn’t configured. Example:
      Book now! (See more examples)
    • Custom Domain Name – If you created a custom domain name to point to your schedule, you can enter it here to correctly point your users to it.
    • Enable HTTPS – Check this option if you have enabled ‘Encrypt connection with SSL/TLS’ for your SuperSaaS schedule(s).
Drupal SuperSaaS Module

Install Drupal Extension

For Drupal 7, 8, 9 or 10 it is easy to implement the SuperSaaS module.
  • Go to “Extend” or “Modules” in the Administrator menu
  • Click “Install new module”
  • In field “Install from a URL” paste: (Drupal 7) or (Drupal 8, 9 & 10)
  • Enable the module
  • To Configure the module follow the instructions at point 2 above

Change SuperSaaS account settings to work with Drupal

Your Drupal user database is leading, which means that changes in user information on your Drupal site propagate to SuperSaaS but not the other way around. Therefore, we recommend that you do not let your users change their user information on SuperSaaS because that could easily confuse them. For example, if a user were allowed to change his password on SuperSaaS he would probably not realize that his Drupal password is still the same. Make the following changes to your SuperSaaS account to avoid such inconsistencies:

  • On the Access Control page, select Log in and registration managed on your site
  • On the Access Control page, select Prevent users from updating their own information
  • On the Layout Settings page, fill out the box Your URL with the URL of the page on your site where users can log in

Furthermore, you need to ensure that the database fields in Drupal match those in your SuperSaaS user database. Make the following changes on the Access Control page:

  • Deselect Use email address as login name
  • Switch the Email address radio button that appears to Optional (or Required)
  • Switch all other fields to Don’t Ask (you can switch off the Password field too if you have selected Login is not handled here)

You can now try out the button on your site. As the administrator, you will still need to log in through the main SuperSaaS login page so you would want to try this out pretending to be a regular user. If you want to define superusers in SuperSaaS, make sure they have logged in at least once using the button before changing their role on the User Management page.

SuperSaaS Access Control

Configure SuperSaaS

This image depicts the Access Control page in your SuperSaaS account after making the settings described above.

Add the button to your pages

In the main menu go to Structure (Drupal 7, 8, 9 or 10) or Site building (Drupal 6) and select the option Block layout (Drupal 8 or 9) or Blocks (Drupal 6 or 7). Next, click Place block (Drupal 8 or 9) or drag the SuperSaaS Login block (Drupal 6 or 7) to an appropriate location on the page. You can click configure to further customize the title and the pages on which the button should display.

Placing the SuperSaaS Login module to the chosen location
The SuperSaaS Login button on a Drupal site

Troubleshooting tips

  • Note that the button only appears to users who are logged in to your Drupal site
  • If you see an error Email is not a valid email address, then please read the previous paragraph again to confirm you have made the correct settings in your SuperSaaS account
  • If the button redirects the user but does not appear to actually log him in and you have used a URL in the field Schedule name or URL, then make sure that the domain of that URL is entered in the Custom Domain Name field