https://www.ory.sh/ logo
#talk-kratos
Title
# talk-kratos
d

dry-energy-23478

01/11/2022, 8:27 AM
Hello all, I have a small question. In my application, we will have two types of users, staff and customer. Both of them will have also some roles. Now, I have two sign-in (one for customer and one for staff), but only one sign-up (for customer), staff being created from the admin api. My question is, because of that, I think I should create two different kratos project right? I can not use two identity schema, because I will not be able to remove sign-up for just one schema in the future when it will be possible? Also, I saw this issue (https://github.com/ory/kratos/issues/765), but I don’t think it is possible right now to choose with identity schema to use for a specific sign-in page right? So my best option is to create two different kratos projects, one for staff, and one for employe right?
p

proud-plumber-24205

01/11/2022, 3:11 PM
Hi @User Yes you are correct. You will need to run two instances of Kratos. You can use the same database though, as long as you stick with the same version for both instances.
d

dry-energy-23478

01/11/2022, 3:55 PM
Okay, thank you for your answer Alano !
(I am using ory cloud, so no way to specify to use the same db by the way)
p

proud-plumber-24205

01/11/2022, 5:09 PM
Ah i see, sorry about that. I assumed you were self-hosting. Yes in this case we do not support multiple identity schemas yet on a singular project. You will then need two projects each managing their own identity schema.
d

dry-energy-23478

01/11/2022, 5:11 PM
No worries, I did not specify it in the message. Yeah, but even with the possibility to have multiple identity schemas in the future on ory cloud, it will not help with my problem no? I will still have to desactivate the signup for the staff identity schemas, which is not possible I think.
p

proud-plumber-24205

01/12/2022, 9:14 PM
That's a good point. Yes currently it will not solve your problem and you will have to run two projects even with multiple identity schema support. Thinking about this a bit, it might be possible to cancel the registration flow by using a web-hook on pre-registration, but it's currently still a work in progress on the cloud.
d

dry-energy-23478

01/13/2022, 8:03 AM
yeah indeed, I can use web hook to cancel or not the signup just on for the staff identity schema. But even with that, I think I will still have this issue : https://github.com/ory/kratos/issues/765 Or is there a way to specify which identity schema the signin/signup flow should use?
p

proud-plumber-24205

01/13/2022, 8:54 AM
Yes, as mentioned above we would need both of these features to accommodate your requirements. Unfortunately, I cannot see how we would have all of these working together very soon.
d

dry-energy-23478

01/13/2022, 8:58 AM
Okay, thank you for your answer ! I will create two projects, it seems more easier for now !
5 Views