Set a value property to the Kinde user
Hi guys, I'm looking for some help with this.
Currently the flow we use would be like this:
- The user visits the web app
- If the user does not have a session, it is redirected to the auth provider's access page
- If the auth provider detects that it is a sign up event, it attaches a random uuid v4 to the user properties and communicates to our API to create the user with the uuid that it assigned.
- If everything is ok, the user is redirected to the web app and the uuid is found in the properties of their id token.
So the only way I can think of for this to work with Kinde is:
- Add the property to the user's record
- When the user returns to our web app, check if the user exists or not. Negative case create it.
But is there any way to generate in Kinde or add a uuid pre sign up? I still haven't found a way to do it
I understand that an alternative flow would be that once the session is obtained, verify if the user exists, if it does not exist, create it, modify the properties with the uuid assigned by our service through the Kinde API. Refresh the session in the web app
Any ideas for a flow that doesn't include creating custom login/sign up?
1 Reply
Thanks for detailing your use case.
So, initial thought it would be to harness the custom sign-up and sign-in feature.
https://kinde.com/docs/authentication-and-access/custom-authentication-pages/
https://kinde.com/blog/engineering/how-to-create-a-custom-sign-in-sign-up-form/
So with your own first auth page, you could run your checks there, before directing to Kinde.
Thoughts on if this solves your case?
Kinde Docs
Custom sign-up and sign-in pages - Authentication and access - Help...
Our developer tools provide everything you need to get started with Kinde.
Kinde Blog
How to create a custom sign-in/sign-up form
If you're familiar with Kinde, you've likely seen the default sign-in template that appears upon clicking the sign-in button. While this template is customizable, it doesn't offer the full flexibility that many developers crave.