Knowledge base
1000 FAQs, 500 tutorials and explanatory 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 it is hosted by Infomaniak or not) using their Infomaniak credentials.
Preamble
- Allowing login via an Infomaniak account on your Drupal site allows your visitors to comment, register for courses, or access any member-only content with a single click, without having to create a new account.
- This saves them time and is a safer method for you, as you do not 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:
- Click here to access the management of your Auth product on the Infomaniak Manager (need help?).
- Click the button to Create a new application:
- Choose the type "Web Front-End".
- Give a name to your application.
- 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). - Click the button to complete the app creation:
- Carefully note the 2 pieces of information obtained during the finalization of your OAuth2 application:
B. Configure the Drupal extension
Via SSH, deploy Composer if necessary to retrieve the openid_connect
and infomaniak_connect
extensions. To do this:
- You may need to edit the composer.json file as the version of
openid_connect
is not yet considered stable. Add: "minimum-stability": "dev", "prefer-stable": true
- The SSH commands for installing the 2 extensions are here:
Then, on Drupal:
- Search for the Infomaniak module among your pre-installed modules.
- Select it.
- Click the Install button:
- The installation of the dependencies will proceed:
- Under Configuration, click to set up the OpenID connection:
- Click the edit button:
- The only fields to fill in are Client ID and Client Secret and come from the information obtained in point A above:
- Do not forget to save the changes made to the extension settings.
- In the Settings tab, you can choose the display type for your login page; do not forget to save:
- An additional button, for logging in with an Infomaniak identifier, is now visible on your login page for users:
Link to this FAQ: