Skip to content

Installation & Setup#

Requirements#

Base Module (bankid)#

  • Drupal 11 (>= 11.4) or Drupal 12
  • Key module (version >= 8.x-1.17)
  • A BankID Relying Party (RP) agreement with your bank for test/production usage.

Submodules (bankid_login)#


Installation#

Install using Composer:

1
composer require drupal/bankid

Enable the base module and optionally the login submodule:

1
drush pm:enable bankid bankid_login

Configuration#

  1. BankID Settings: Navigate to Configuration > System > BankID (/admin/config/system/bankid) to select the operating environment (Mock, Test, or Production) and certificate keys.
  2. BankID Login Settings: If using the bankid_login submodule, configure login behavior under Configuration > System > BankID > Login (/admin/config/system/bankid/login), including user auto-registration and redirect paths.
  3. Placing the Login Block: Navigate to Structure > Block layout (/admin/structure/block) and place the BankID Login block in your desired region.
  4. Rendering in Twig: You can also embed the login form in a custom Twig template using Twig Tweak:
1
{{ drupal_form('Drupal\\bankid_login\\Form\\BankIDLoginForm') }}