Add Support for Customizable OpenID Profile Fields via Environment Variable #4354
geodanchev
started this conversation in
Feature Requests & Suggestions
Replies: 2 comments 1 reply
-
Great idea! I'm all for it |
Beta Was this translation helpful? Give feedback.
1 reply
-
request a pull request with a more dynamic approach #5612 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to propose adding support for customizable OpenID profile fields in the user model using an environment variable.
Overview:
This feature would introduce a new environment variable,
OPENID_CUSTOM_DATA
, that allows developers to define which fields from the OpenID profile should be dynamically fetched and stored in the user model. The fields specified in this variable will be fetched from the OpenID provider (e.g., Microsoft Graph API) and saved in a new, flexiblecustomOpenIdData
field in the user schema.Key Benefits:
customOpenIdData
field in the user schema is a Map type, allowing it to easily store key-value pairs of custom profile data.OPENID_CUSTOM_DATA
environment variable is set. If the variable is not defined, the system will continue to function as it does currently.Suggested Implementation:
Environment Variable: Introduce the
OPENID_CUSTOM_DATA
variable to define custom profile fields (space-separated) to be fetched from the OpenID provider.OPENID_CUSTOM_DATA="department title"
User Schema: Extend the user schema with a
customOpenIdData
field of typeMap<String, String>
, allowing flexible storage of the fetched data.Data Population: Upon user login, fetch the fields specified in
OPENID_CUSTOM_DATA
from the OpenID provider, and store them in thecustomOpenIdData
field for each user.Example:
If
OPENID_CUSTOM_DATA="department title"
is set, the following data could be stored in MongoDB for a user:In my case this feature will help me make useful statistics for example : how many users per department are using the app and provide department help and use specific use case scenarios, to help users better understand how they can benefit from AI.
Beta Was this translation helpful? Give feedback.
All reactions