Automattic / Automattic/wp-openid-connect-server

Customize no permission error message

Open
#113 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
44
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Would it be possible to add the `oidc_no_permission_error_message` filter hook to the `AuthenticateHandler` class to customize the error message when the current user has no permission?

In our case, we need to say which action a user needs to take to be able to login.

https://github.com/Automattic/wp-openid-connect-server/blob/3c5f3aacb611dcc6d1b7823b58b07160212151ea/src/Http/Handlers/AuthenticateHandler.php#L79-L82

Please, let me know if there is any other way to achieve it.

Contributor guide

Open the contributing guide

Research direction

Start in src/Http/Handlers/AuthenticateHandler.php at the linked lines where the no-permission error is handled. Trace how that error message is produced, then verify that the requested oidc_no_permission_error_message filter can customize it while preserving the existing no-permission behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
authentication
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.