Allow OIDC to Unblock Account

Created on 22 April 2025, 3 days ago

Problem/Motivation

Certain requirements have user accounts being blocked automatically after a period of no site visits. As we manage our accounts in the client connected through OpenID Connect, a valid response from the client means the account is still in good standing. Therefore, to reduce the workload of our admins, we wanted the site to automatically unblock accounts that perform a successful authentication with the client.

Steps to reproduce

1. Block an account that is still valid in the OIDC client.
2. Attempt to log in with that account using OIDC method.
3. See the "The username %name has not been activated or is blocked." message.

Proposed resolution

Add a new config option in the Advanced -> Security Implications section of the module config.
If the new config is enabled, have the portion of code that checks ->isBlocked() then perform an ->activate() instead of terminating with `return FALSE;`

Remaining tasks

Test the patch. Revise as needed.

User interface changes

New checkbox added to module config form.

Source Credit

This patch brought to you by the efforts of FDIC https://www.drupal.org/federal-deposit-insurance-corporation-fdic β†’

✨ Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States developerweeks

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024