Which module version to use
The OpenID Connect module has two maintained lines (October 2026):
| Release line | Drupal core | Status |
|---|---|---|
3.0.0-alpha9 (^3.0@alpha) | ^10.2 or ^11 | Alpha; the only line that supports Drupal 11 |
8.x-1.5 (^1.5) | ^9.5 or ^10 | Stable, covered by the Drupal Security Team |
Set up the Generic client
Install the module
Run
composer require 'drupal/openid_connect:^3.0@alpha'on Drupal 11 (or^1.5on Drupal 10 if you need a stable release), then enable it withdrush en openid_connect.Register the redirect URL in Dorvis
The module returns users to
https://your-site.lv/openid-connect/CLIENTwhereCLIENTis the machine name of the client, for examplehttps://your-site.lv/openid-connect/dorvis. Add that URL to your integration in the Dorvis portal and copy the client ID and secret.Create the client
Go to Configuration → People → OpenID Connect (
/admin/config/people/openid-connect) and add or enable a client of the Generic type. Enter Client ID, Client secret and the Dorvis endpoints from the table below.Choose the user settings
On the module settings enable Save user claims on every login so name changes are copied. Leave Automatically connect existing users off: it links accounts by e-mail, and Dorvis sends none. Turn on Override registration settings: otherwise Drupal's own registration setting applies and new Dorvis users are refused (*Administrators only*) or created blocked (*Visitors, but administrator approval is required*). Set Show external providers in user login form to *Above* or *Below*; in 3.x it defaults to *Hidden* and
/user/loginshows no Dorvis button.Handle the missing e-mail
The module needs an e-mail address to create a Drupal account. Add the small custom module shown below, which sets a placeholder address and stores the personal code.
Test the login
Log out and use the "Log in with …" button on
/user/login. Check the new account under People.
Generic client values for Dorvis
| Field | Value |
|---|---|
| Authorization endpoint | https://dorvis.eu/oidc/oauth2/auth |
| Token endpoint | https://dorvis.eu/oidc/oauth2/token |
| UserInfo endpoint | https://dorvis.eu/oidc/userinfo |
| End session endpoint | https://dorvis.eu/oidc/oauth2/sessions/logout |
| Scopes | openid profile |
| Issuer URL, with Use well-known endpoints (fills the three endpoints above) | https://dorvis.eu/oidc/ (the trailing slash is required, otherwise the module reports the issuer as invalid) |
Custom module: placeholder e-mail and person_code
Put this in mymodule.module. The alter hook runs before the account is created; the save hook gets the user entity and the claims. Create a user field field_person_code only if you have a purpose for storing it. Hook signatures can change between alpha releases, so compare them with openid_connect.api.php in your installed version.
<?php
use Drupal\user\UserInterface;
/**
* Implements hook_openid_connect_userinfo_alter().
*/
function mymodule_openid_connect_userinfo_alter(array &$userinfo, array $context) {
// Dorvis returns no e-mail; Drupal accounts need one.
if (empty($userinfo['email']) && !empty($userinfo['sub'])) {
$userinfo['email'] = $userinfo['sub'] . '@users.your-site.lv';
}
}
/**
* Implements hook_openid_connect_userinfo_save().
*/
function mymodule_openid_connect_userinfo_save(UserInterface $account, array $context) {
$userinfo = $context['userinfo'];
if ($account->hasField('field_person_code') && !empty($userinfo['person_code'])) {
$account->set('field_person_code', $userinfo['person_code']);
}
}Opening Smart-ID or eParaksts directly (acr_values)
Without acr_values Dorvis shows a chooser with all methods enabled in your integration, so one Drupal client and one button are enough.
For a button per method, create one Generic client per method (for example dorvis_smartid and dorvis_eparaksts) and add the method to its authorization endpoint: https://dorvis.eu/oidc/oauth2/auth?acr_values=idp:smartid. Drupal builds the redirect with its URL API, which keeps query parameters already present in the endpoint. Each client has its own redirect URL, so register every one in Dorvis.
Each client also keeps its own link between Dorvis users and Drupal accounts. A person who logs in with one button and later with another is treated as a new user, and with the placeholder e-mail above that second login is refused with "The email address is already taken". Use one client per method only if every user always picks the same method or you link the accounts yourself; otherwise keep one client and let Dorvis show its chooser.
Values: idp:smartid, idp:eparaksts-mobile, idp:eparaksts, idp:swedbank, idp:seb, idp:citadele, idp:luminor or idp:edim (Digimaks); send one value per request. If you prefer code over configuration, a client plugin that extends the Generic client can add acr_values to the authorization request options instead.
Did not find the answer?
Write to us and a developer will reply.






