Take the screenshot I attached. Picture this, I have a client account that is in the CLIENT org. When i click on "Become a provider" which should sign me up as part of PROVIDER org it adds to my kinde profile that i'm part of both org. I want to disable it and what would be better for me is that if the user already exists in the DB we send to him the verification code as for a login and not for a registration.
Hi @IkiTg07 , I am not 100% sure I am following, are you able to explain little more or put together a miro or alternative showing the flow you're after?
When the visitor create a provider account using user2@example.com if he tries to register to a client account using the sign up button it shouldn't let him do and just log him in. Or at least this it what I want, I want to prevent an existing user to sign up to multiple org
I could do that in my callback url by checking its role in the DB and deleting the newly added org by kinde but I feel like I should be able to deactivate this behavior
I could do that in my callback url by checking its role in the DB and deleting the newly added org by kindergarten
This is the only way I could think of this unfortunately. Nothing else comes to mind right now 😢 We are working on workflows/actions in the auth flow and I think our initial solution won't solve this case but future iterations will.
Apologies @IkiTg07, I wish I could be more of a help here
In my callback I check for the user in the DB. In my DB I have a user table with role column. So if the user exists I check its kinde organization field and update its info to delete the extra org that is !== user role in db