astonishing-morning-18498
12/05/2023, 4:15 PMtransient_payload
. How would I go about sending extra parameters during registration and when kratos responds with an error during registration?chilly-king-10285
12/05/2023, 4:15 PMchilly-king-10285
12/05/2023, 4:16 PMastonishing-morning-18498
12/05/2023, 4:23 PMchilly-king-10285
12/05/2023, 4:23 PMchilly-king-10285
12/05/2023, 4:24 PMtransient_payload
is used to pass additional data from the registration to a webhook. However, it's important to note that this data is not persisted by Ory Kratos and won't be reflected in the UI directly. If you want to reflect changes in the UI, you would need to handle this in your application logic. For example, you could use the data from the transient_payload
in your webhook to make changes to your application's state or database, and then reflect these changes in your UI. Remember that the transient_payload
is meant for more complex use cases where you need to pass additional data to the flow, and it's not designed to directly interact with or update the UI. For more information, you can refer to the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-registration-flow).astonishing-morning-18498
12/05/2023, 4:58 PMchilly-king-10285
12/05/2023, 4:58 PMchilly-king-10285
12/05/2023, 4:58 PMastonishing-morning-18498
12/05/2023, 4:59 PMchilly-king-10285
12/05/2023, 4:59 PMchilly-king-10285
12/05/2023, 4:59 PMtraits
field is not recommended. The traits
field is meant to store user attributes that are persisted by Ory Kratos and are visible to the user. Users can see traits and other data - except credentials - using the /sessions/whoami
endpoint. Users are also able to edit identity traits. If the invitation code is sensitive data that should be obfuscated from the user, it's better to store it in the metadata_admin
field. This field is designed to store sensitive internal data that can't be viewed or changed by the end user. Here's an excerpt from the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/manage-identities/best-practices): > The identity schema isn't the right place to store data that should be obfuscated from the user. Users can see traits and other data - except credentials - using the /sessions/whoami
endpoint. Users are also able to edit identity traits. Don't store sensitive internal data in the identity's traits. Use the metadata_admin
field for this purpose. So, if you need to store an invitation code, consider using the metadata_admin
field or another secure method that fits your application's requirements.astonishing-morning-18498
12/05/2023, 5:01 PMchilly-king-10285
12/05/2023, 5:01 PMchilly-king-10285
12/05/2023, 5:01 PMtraits
field is visible to the UI and is persisted, while the transient_payload
field is not persisted but is also not directly visible to the UI. A potential workaround could be to use the transient_payload
field to pass the data to your application, and then handle the display of this data in your UI separately. However, this would require custom logic in your application and is not directly supported by Ory Kratos. For more information, you can refer to the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-registration-flow).