Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Use the "Infomaniak_Connect" extension for Drupal

This guide concerns the Drupal module "Infomaniak_Connect" which allows users to log in to your Drupal site (whether hosted by Infomaniak or not) using their Infomaniak credentials.

 

Preamble

  • Allowing login via an Infomaniak account on your Drupal site enables your visitors to comment, register for courses, or access any member-exclusive content with a single click, without needing to create a new account.
  • This saves them time and is a safer method for you, as you don't have to manage additional passwords.
  • The operation of this external module is identical to the options "Log in with Google", "Log in with Facebook" or "Log in with Apple"; it uses the standard protocols OAuth2 and OpenID Connect to enable single sign-on (SSO).

 

A. Create an application with Auth Infomaniak

To do this:

  1. Click here to access the management of your product Auth on the Infomaniak Manager (need help?).
  2. Click the button to Create a new application
  3. Choose the type "Web Front-End".
  4. Give a name to your application.
  5. In the URL field, specify the domain name corresponding to your Drupal site followed by /openid-connect-authorize (refer to the GitHub documentation if necessary).
  6. Click the button to complete the app creation:
  7. Carefully note the 2 pieces of information obtained when finalizing your OAuth2 application:

 

B. Configure the Drupal extension

In SSH, deploy Composer if necessary to retrieve the openid_connect and infomaniak_connect extensions. To do this:

Then, on Drupal:

  1. Search for the Infomaniak module among your pre-installed modules.
  2. Select it.
  3. Click the Install button:
  4. The installation of dependencies will proceed:
  5. Under Configuration, click to set up the OpenID connection:
  6. Click the edit button:
  7. The only fields to fill in are Client ID and Client Secret and come from the information obtained in point A above:
     
  8. Do not forget to save the changes made to the extension settings.
  9. In the Settings tab, you can choose the display type for your login page; do not forget to save:
  10. An additional button, for logging in with an Infomaniak identifier, is now visible on your login page intended for users:
     

Has this FAQ been helpful?