K
Kinde7mo ago
Sophia

Kinde sign-in screen register link means no new org

Hi there, I've got a NextJS app using the SDK and also the Kinde API on other sections. Basically I want the user flow to be: A manager-level user registers (using the <RegisterLink> component), creating a new organisation and then is able to add their team members to that organisation from within the app using the Kinde API. I've got this working but have noticed a bug I'm not sure if there's a solution for. My <RegisterLink> passes the create_new_org property so as long as it's clicked, it's fine. However, if a new user clicks "Sign In" by accident, they're taken to a Kinde sign-in screen, which has the option "no account? create one". If they click this link, it registers them, without creating a new org, so they get added to the default org, which messes up the above user flow. Is there any way to remove this "create one" link from the Kinde sign-in page? Or, any way to pass the create_new_org property to it? Or am I going to have to uproot the whole thing and use custom sign-in and register pages? If the third option, is it possible to use the NextJS SDK components <LoginLink> and <RegisterLink> with custom sign-in pages? Otherwise could you point me to the best way to implement this in NextJS? Thank you very much in advance!
No description
2 Replies
Peteswah
Peteswah7mo ago
Hi @Sophia, sorry if I don't fully understand the issue - I will try and give as much relevant info as possible - Settings -> Environment Details there are some sign up options (img) - Signing into organizations with nextjs https://docs.kinde.com/developer-tools/sdks/backend/nextjs-sdk/#sign-into-organizations - More info https://docs.kinde.com/build/organizations/allow-user-signup-org/
Kinde docs
Manage user sign up to organizations
Our developer tools provide everything you need to get started with Kinde.
Kinde docs
NextJS App Router SDK
Our developer tools provide everything you need to get started with Kinde.
No description
Sophia
SophiaOP7mo ago
Thank you, I've already looked at most of these resources. I'll try and explain my issue more clearly. I'm using the is_create_org parameter with a <RegisterLink> to create new organisations whenever someone registers. However, the default Kinde sign-in screen (accessed via a <LoginLink>) provides an option to navigate to the default Kinde sign-up screen (see my screenshot). This means users are able to click that button and they are then registered WITHOUT creating a new organisation. I want to know if there's any way to bypass or prevent this, or if I'm simply unable to use the default sign-in/sign-up screens with the is_create_org parameter. Also, just generally how to build custom sign-up/sign-in screens with NextJS as the documentation only provides an indication of how a Login button might work - do I simply create a form? Does it need to be done via a request to the Kinde API? Hi @Peter (Kinde) , wondered if you (or the team) had any further thoughts on this? Thank you!
Want results from more Discord servers?
Add your server