Step By Step Guide To Setup Login Into Rocket Chat With Drupal

This document will allow your users to log into Rocket Chat using their Drupal credentials. At the end of this guide, you will be able to configure Rocket Chat as an OAuth Client with Drupal as your OAuth Provider.
If you have any doubts or queries you can contact us at drupalsupport@xecurify.com. We will help you to configure the module.

Step 1: Configure Single Sign-On (SSO) settings in Rocket chat

  • Sign into your Rocket Chat instance with an administrator account and select Administration from the menu.
  • Rocket Chat Single Sign On SSO Administration
  • Select the OAuth section under Administration.
  • Rocket Chat Single Sign On SSO OAuth Setup
  • Click on the Add custom OAuth button on the right top-corner to create a new OAuth Application:
  • Rocket Chat Single Sign On SSO Custom OAuth
    Rocket Chat Single Sign On SSO Chat Add client
  • In the Application Configuration tab, copy the Callback URL (For example: https://your_domain/_oauth/id) and keep it handy to save it in the miniOrange OAuth Server module. You will find this URL from the highlighted section of your Rocket Chat console as shown in the below image
  • Rocket Chat Single Sign On SSO callback URL

Step 2: Configuring miniOrange OAuth Server module for Drupal

  • Click here to download the miniOrange OAuth Server module.
  • Rocket Chat Single Sign On SSO - Drupal Download
  • Login in your Drupal site’s admin console and click on Extend/Modules from the top navigation bar.
  • Click on the Install new module button or directly go to /admin/modules/install to install the module.
  • Upload the downloaded .zip or tar.gz of the module and click on Install.
  • Rocket Chat Single Sign On SSO - Drupal Install
  • After successful installation, click on Enable newly added modules and select miniOrange OAuth Server module. Then click on the Install button to proceed with the installations.
  • Rocket Chat Single Sign On SSO - Drupal Enable
  • Click on Configurations from the top navigation menu.
  • Click on Drupal OAuth Server Configuration to go to the configuration page of the module.
  • Rocket Chat Single Sign On SSO - Drupal Config
  • In the OAuth Client tab, Enter the OAuth Client name and then paste the Callback URL that you copied earlier and save it under the Authorized Redirect URL. Then click on the Next button to continue.
  • Rocket Chat Single Sign On SSO - Drupal Add Client
  • It will show you the Client ID, Client Secret and the Endpoints. Copy the Client ID, Client Secret, Scope and the Endpoints and keep it handy. You will be needing these values later to save them in your Rocket Chat client application.
  • Rocket Chat Single Sign On SSO - Drupal Configuration
  • Go back to the Client application that you already created in your Rocket Chat console and save the information that you copied from the OAuth Server module in Drupal.
  • Values to be entered in the Rocket Chat Application:
  • Enable: True
    URL: https://your_drupal_site_url (do not include a trailing “/”)
    Token Path: /access_token
    Token Sent Via: Payload
    Identity Token Sent Via: Header
    Identity Path: /user_info
    Authorize Path: /authorize
    Scope: profile
    Param name for Access Token: access_token
    ID: The Client ID from the OAuth Server module in Drupal
    Secret: The Client Secret from the OAuth Server module in Drupal
    Login style: Redirect
    Username field: mail
    Name field: name
    Merge Users: True
    Show button on Login Page: True

    Rocket Chat Single Sign On SSO - Settings
    Rocket Chat Single Sign On SSO - Configurations
  • Still, if you are facing any difficulty or if you have any questions in mind, you can reach out to us by submitting a query in the Support tab of a module or by sending us a mail at info@xecurify.com.
  • Congratulations, you have successfully configured the miniOrange Drupal OAuth Server module.

Free Trial

If you are looking for anything which you cannot find, please drop us an email on info@xecurify.com