How to get Kinde user id after a User creates their account?
If I want to create a record in my own database once a user creates an account using Kinde, how do I approach this? I want this to happen after a user registers an account. Should I use the Management API? And if so, will I have to build my own Sign Up UI, instead of being able to use the UI that Kinde provides after clicking <RegisterLink />?
Thanks
5 Replies
1. Correct using the Management API to add the user to your database after sign up is the best way. We also have a webhook close to being in beta that can be used to achieve this.
2. If you break up your sign up flow, then yes you can use your own UI, but the user will need to use Kinde's UI to set their password and verify their email. We do have plans to build out a more customisable auth forms next year.
I actually don’t want to stop using Kinde’s Auth flow. I just dont understand how to use it in conjunction with the Management API. Is it possible to somehow use both in the user account creation process?
So probably the most common way to use the API with user creation. Is to provision the user via API and then you would manually communicate to them to 'sign in' via the Kinde hosted UI. Given its their first time, our auth flow would get them to set their password (if you have that turned on) and verify their email. This flow is normally used for SaaS products that dont allow self sign up.
Are you able to explain further on the style of sign up experience you are after? As that might help with our advice for you.
I see, that makes it simpler than I thought.
I still feel it may look a bit weird to have 2 separate UIs for creating an account (since the Kinde hosted UI will always show the 'Create an account' option, whereas I would also have to build my own in order to provision the user via API. Unless I'm missing something.
The ideal sign up experience I'm looking after is basically what you guys already provide with the Kinde hosted UI.
Is there any way to disable creating an account in Kinde's UI?
Glad my answer is expanding your understanding.
Certainly can https://kinde.com/docs/authentication-and-access/disable-sign-up/
Kinde Docs
Disable self sign-up - Authentication and access - Help center
Our developer tools provide everything you need to get started with Kinde.