Getting Started
Drupal module
Connect a Drupal website to DocID®, map verified users to roles, and protect content.
The official DocID® module for Drupal uses DocID® authentication while keeping Drupal's native users, roles, permissions, sessions, nodes, and media. Version 1.0.0 supports Drupal 10.3 or later and Drupal 11.
Open the DocID® module on Drupal.org
Prerequisites
- Drupal 10.3 or later, or Drupal 11, and PHP 8.1 or later
- A Drupal website on HTTPS and permission to install and configure modules
- A DocID® account with a configured website asset and its OAuth credentials
- The Drupal core File, Filter, Node, Options, and User modules; Media is optional for protected media
The stable 1.0.0 release has no additional production dependency beyond Drupal core.
Install the module
From the root of your Drupal project, install the stable release with Composer:
composer require 'drupal/docid:^1.0'Enable the module
Enable the module and rebuild Drupal's cache:
drush en dociddrush crConfigure authentication
- Open Configuration → People → DocID®.
- Copy the callback URL shown on the settings page.
- Add that callback URL as an allowed redirect URI for the website asset in the DocID® business dashboard.
- Enter the client ID and client secret issued for the website asset.
- Review Requested customer data. openid and professional are always enabled; enable profile, email, or phone only if the website needs those optional data.
- Configure the Drupal roles that should be assigned for matching professions or disciplines.
- Review Drupal's permissions and grant the required permissions to the mapped roles.
- Place the DocID® sign-in block, or link visitors to
/docid/login. - Optionally configure post-login destinations and content protection, then test sign-in and sign-out with a non-administrator account.
Requested customer data
The openid and professional scopes are always enabled. They provide sub, profession_id, discipline_id, and profession_verified for authentication, access checks, and stable account linking. The optional profile, email, and phone scopes are disabled by default. Enable only the customer data the website actually needs. DocID® transfers these optional data only after the user authorizes the transfer.
Map roles and permissions
[docid-loggedin][docid-loggedin-content]Visible to linked users[/docid-loggedin-content][docid-loggedout-content]Visible to other visitors[/docid-loggedout-content][docid-username][docid-logout-link]Production and support
- Keep the client secret in environment-specific Drupal configuration and use the exact HTTPS callback URL shown by the module.
- Review mapped-role permissions and test the complete flow with a non-administrator account.
- Rebuild node permissions when Drupal requests it after access-related module changes.
- Use the Drupal.org issue queue for module-specific bugs, compatibility reports, and feature requests.