K
Kinde6mo ago
IkiTg07

disabling multi-orga sign-up

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.
No description
11 Replies
Daniel_Kinde
Daniel_Kinde6mo ago
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?
IkiTg07
IkiTg07OP6mo ago
@Daniel_Kinde Is it clearer ?
No description
IkiTg07
IkiTg07OP6mo ago
When the visitor create a provider account using [email protected] 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 Sorry to tag you @Oli - Kinde but i need to fix this quickly
Oli - Kinde
Oli - Kinde6mo ago
Hey @IkiTg07, In the screenshotted case, do you want the user to be authenticated and have the following profile information: - Email: [email protected] - Org: PROVIDER (don't add them to CLIENT org)? Is this right?
No description
IkiTg07
IkiTg07OP6mo ago
That’s exactly what I want
Oli - Kinde
Oli - Kinde6mo ago
Hey @IkiTg07, This use-case is quite a difficult one to solve with Kinde. Are you able to explain more about your use-case for having this logic?
IkiTg07
IkiTg07OP6mo ago
It’s just that when a user tries to register to multiple organizations I want to block that and log him using its first 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
Oli - Kinde
Oli - Kinde6mo ago
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
IkiTg07
IkiTg07OP6mo ago
No worries in the end maybe it’ll help you see through some edge cases like mine and prepare a solution for it 😄
Raphael Viegas
Raphael Viegas6mo ago
@IkiTg07, did you manage to solve this problem? Trying to do this logic on /callback with no success...
IkiTg07
IkiTg07OP5mo ago
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 Hope it’s clear Hey did you figure it out ?
Want results from more Discord servers?
Add your server