Replies: 4 comments 9 replies
-
Since I'm using this plugin for my company's project, I'm willing to contribute by implementing this feature request. Thank you. |
Beta Was this translation helpful? Give feedback.
-
So, while I'm not opposed to considering something like this the plugin can already be used to accomplish this by leveraging the hooks that plugin provides that will allow you to save additional data. Additionally, there is a filter which can also be used to create your own plugin settings fields of you want something to be configurable and not hard-coded. You can see an example of using these in a MU Plugin I created that maps IDP groups to WordPress roles here: https://github.com/timnolte/oidc-keycloak-sso/blob/main/oidc-keycloak-custom.php |
Beta Was this translation helpful? Give feedback.
-
Thank you @timnolte for your helpful guide! As I understand, are you suggesting that I can extend the plugin in my own folk, using the hooks and setting fields, to accomplish this feature? |
Beta Was this translation helpful? Give feedback.
-
Besides, I'm following this guideline to setup local development environment but it doesn't work. I think that the wiki is outdated since the package.json file has changed. Can you kindly add more guide to this? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Current Behavior:
The OpenID Connect Generic plugin currently maps basic user information (like username and email) retrieved from the OIDC provider to the corresponding WordPress user account fields.
Here's an example of the code snippet in
openid-connect-generic-client-wrapper.php
that creates a new user:Desired Feature:
I want to propose a new feature that allows the plugin to save additional user fields obtained during the OIDC login process. This would enable us to store additional custom data within the WordPress user database.
For example, I'd like to capture a user's
payment_token
from the OIDC provider's user table and save it as a custom user field in WordPress.Benefits:
Proposed Implementation:
Introduce a new configuration option within the plugin settings named
additional_user_fields
. This option would accept data as a key-value map:Implementation Flow:
additional_user_fields
map, the plugin would perform the following steps:Example Configuration:
Advantages:
This approach provides a flexible way to define the mapping between OIDC user attributes and WordPress user meta fields. It leverages existing functionalities within the plugin to handle user claims and user meta data.
—
I believe that this feature would significantly enhance the plugin's capabilities and value for users with diverse use cases. I would like to hear the community feedback on the feasibility and potential improvements for this feature request.
Beta Was this translation helpful? Give feedback.
All reactions