<@U04UQ68083H> when setting up data mapping from a...
# ory-copilot
t
@chilly-king-10285 when setting up data mapping from a social provider, will this data mapping ovveride any possible data within trist or metadata? if not, how can you set it up to always override?
c
A message from kapa.ai
The data mapping process in Ory does not inherently override existing data within traits or metadata. When integrating with social sign-in providers, you specify how to map the data you get from the specific provider to the Identity traits using a Jsonnet code snippet. This snippet becomes a part of the Ory Identities configuration for the given social sign-in provider. If the data returned by the JsonNet data mapper does not validate against the Identity Schema of your project, the user will be redirected to the registration page where they need to update the missing fields. When submitting the form again, the data provided by the user and the data coming from the OpenID Connect / OAuth2 provider will be merged. This process repeats itself until the Identity's traits are valid against the defined JSON Schema. However, the documentation does not provide specific instructions on how to set up the data mapping to always override existing data. It's recommended to refer to the [Ory documentation](https://www.ory.sh/docs/kratos/social-signin/data-mapping) for more detailed information or consider reaching out to the Ory community for further assistance.