Welcome to the Kinde community.

K
A
A
A
M

Custom Sign Up From Not Working As Expected

I've created a custom sign in form, and that works well, it collects an email and redirect to enter the OTP. I'm having trouble doing the same with sign up form. I'm using this code to invoke the sign up:

Plain Text
const { register } = useKindeAuth();
register({
      authUrlParams: {
        login_hint: username,
        connection_id: "conn_xxxx",
      },
    })


When the form is submitted, I'm brought to a page that indicates that a OTP was sent to the username, not the screen that requests that an email be entered. Am I missing something?
k
I
C
11 comments
I've confirmd that conn_xxxx is the correct one for the username + code authentication method and it is enabled for the application.
If you pass a username to the login_hint it will redirects you to the page for the OTP that's normal
Thanks @IkiTg07 i've reviewed this page a few times. As far as I can tell, all of the examples on that page are for sign in. I'm trying to register a user with a custom form.
Well i do have custom sign in and sign up. I'm using them with email tho but I still think it's applicable. When i register a user they are redirected to a page for the OTP because they have to do it to confirm their identity (email in my case)
Check here https://docs.kinde.com/authenticate/authentication-methods/username-authentication/?r=search#_top

"On sign-up or registration, the user will need to do a one-time validation of their identity via email - for security - but they can subsequently use a username to sign in."
Yes, I agree that is what the docs say, but what I experience is, when using register() as shown above, I'm brought to a one time password screen, for an account that doesn't exist for the username I passed to it.
does that mean I must use an email and not username?
All users must have an email as part of their identity. We support username sign in/sign up, but only after an initial account verification via email.
thank you @Claire_Kinde, this does make sense. I'll do some testing and see how it works. I just assumed that if I started with the email, they wouldn't be prompted to enter a username.
Add a reply
Sign up and join the conversation on Discord
Join