bitter-terabyte-10041
01/08/2025, 9:54 AM{
"sub": "6",
"email": "sankettejas@gmail.com",
"email_verified": true,
"name": "admin",
"preferred_username": "admin",
"zoneinfo": "Asia/Kolkata",
"given_name": null,
"family_name": null,
"roles": [
"authenticated user",
"administrator"
]
}
3. In this response, the sub field contains the user ID (6 in this example), which is the unique identifier for the user in Drupal.
4. However, when we migrated users to ORY, the unique identifier we used was the username (e.g., preferred_username), not the user ID.
The Problem:
Since ORY uses the sub field from the response for client-side authentication, we cannot correctly map or identify the user because sub contains the Drupal user ID.
What We’re Looking For:
We need to know if ORY provides a way to map the sub field on ORY's side to use the preferred_username field from the Drupal response instead of the sub value. This would allow ORY to complete client-side authentication based on the unique identifier (username) that we use.
Any guidance, documentation, or solutions to handle this scenario would be greatly appreciated. Thanks in advance!magnificent-energy-493
you cannot override theclaim, but using the Jsonnet mapping, you can decide where the claims from the ID token end up in the identity. So for example if you put the user's email address into the traits, and the email field is marked as an identifier in your identity schema (which is default for thesub
preset), then logins from different SSO providers that use the same email address will be merged together.
So, in order to migrate, you need a common field value (ideally the email address) that is part of the identities traits. Then, this field will be used as an identifier for the identity to ensure that only one identity with that identifier exists in the system.
bitter-terabyte-10041
01/09/2025, 11:08 AMbitter-terabyte-10041
01/09/2025, 11:09 AMbitter-terabyte-10041
01/09/2025, 11:09 AMbitter-terabyte-10041
01/09/2025, 11:10 AMbitter-terabyte-10041
01/09/2025, 11:10 AM