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:
| composer require drupal/bankid
|
Enable the base module and optionally the login submodule:
| drush pm:enable bankid bankid_login
|
Configuration
- BankID Settings:
Navigate to Configuration > System > BankID (
/admin/config/system/bankid) to select the operating environment (Mock, Test, or Production) and certificate keys.
- 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.
- Placing the Login Block:
Navigate to Structure > Block layout (
/admin/structure/block) and place the BankID Login block in your desired region.
- Rendering in Twig:
You can also embed the login form in a custom Twig template using Twig Tweak:
| {{ drupal_form('Drupal\\bankid_login\\Form\\BankIDLoginForm') }}
|