great-laptop-90610
10/02/2024, 9:01 AMpasskey_identifier
to the same as nickname
from the submitted formbrief-egg-61061
10/02/2024, 9:01 AMbrief-egg-61061
10/02/2024, 9:02 AMnickname
claim to the username
trait: jsonnet local claims = { email_verified: false, } + std.extVar('claims'); { identity: { traits: { username: claims.nickname, }, }, }
In this example, claims.nickname
is the nickname
claim returned by the sign-in provider. This value is mapped to the username
trait in the Ory Identity schema. If you want to set the passkey_identifier
to the same as nickname
, you would replace username
with passkey_identifier
in the Jsonnet code snippet. Please note that you should not save secrets such as API keys, credentials, or personal data directly in Jsonnet code snippets. Jsonnet code snippets used for data mapping aren't stored in an encrypted format in Ory Network. For more information, you can refer to the following documentation: - [Salesforce Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/salesforce) - [GitHub Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/github#data-mapping) - [Auth0 Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/auth0) - [Ory API Reference](https://www.ory.sh/docs/reference/api) - [NetID Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/netid) - [Generic Provider Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/generic#additional-configuration) - [Google Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/google#additional-configuration) - [Microsoft Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/microsoft#additional-configuration)great-laptop-90610
10/02/2024, 9:03 AMusername
or nickname
field in the jsonnet?great-laptop-90610
10/02/2024, 9:05 AMusername
or nickname
field in the jsonnet?brief-egg-61061
10/02/2024, 9:05 AMbrief-egg-61061
10/02/2024, 9:06 AMusername
or nickname
field from the claims returned by the sign-in provider. This is done using the claims
object. Here is an example: jsonnet local claims = { email_verified: false, } + std.extVar('claims'); { identity: { traits: { username: claims.nickname, }, }, }
In this example, claims.nickname
is the nickname
claim returned by the sign-in provider. This value is mapped to the username
trait in the Ory Identity schema. If the sign-in provider returns a username
claim, you can access it with claims.username
. Please note that the exact fields available in claims
depend on the sign-in provider and the scopes you have requested. For more information, you can refer to the following documentation: - [Auth0 Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/auth0) - [Discord Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/discord) - [Salesforce Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/salesforce) - [Microsoft Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/microsoft#data-mapping) - [NetID Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/netid)great-laptop-90610
10/02/2024, 9:07 AMnickname
brief-egg-61061
10/02/2024, 9:07 AMbrief-egg-61061
10/02/2024, 9:08 AMnickname
) should be part of the identity traits. If the nickname
field is part of your identity schema, it should be available in the identity traits after the user registration or update process. If you need to perform custom logic based on the form data, you might want to consider using Ory Actions, which allow you to trigger custom logic based on various events in the Ory ecosystem. For more detailed guidance or to discuss your specific use case, I would recommend checking the [Ory documentation](https://www.ory.sh/docs) or reaching out to the Ory community.