Change schema_id #1000
-
I am testing 2 schemas registration, How can i specify in registration flow to use one of? By default is using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
This is not really possible, see #765 for a detailed discussion and also possible implementation. Note that you can change the schema later on: https://www.ory.sh/kratos/docs/reference/api#update-an-identity |
Beta Was this translation helpful? Give feedback.
-
I may have an example: let's suppose I want to register in my system both students and teachers. Those two entities have different schemas, and possibly, different way of accessing (password, oidc). The first way for me would be to register them with some basic traits (common for both) and then, upon the registration, trigger the udpateIdentity to change their schema accordingly. Unfortunately, doing so would nullify the benefit of having the right UI nodes in my initialization of the registration flow. The other way I can think of would be doing basically all through API calls on the server side: custom UI fields for teachers and students -> POST request to my server with traits -> creating identity with the right schema with the kratos admin API -> sending invitation for setting password (which afaik can't be set in any other way with the createIdentity call) Therefore I think it would be great to have something like a query parameter to let kratos know which registration flow I'm about to start. Please let me know your thoughts and if I missed something |
Beta Was this translation helpful? Give feedback.
This is not really possible, see #765 for a detailed discussion and also possible implementation. Note that you can change the schema later on: https://www.ory.sh/kratos/docs/reference/api#update-an-identity
You will have to transform the actual traits somehow. We do plan to add support for that using some jsonnet code. I could not find an issue for that right now.