Can I Sign up a user with like a function that tak...
# general
l
Can I Sign up a user with like a function that takes parameters for username, password, email, ect... ex:
Copy code
ts
signUp({
  username: 'LouieMartin',
  password: '123123',
});
r
hey!
yea. technically, you can.
l
Hello, you responded fast today.
r
well, i was online haha
am*
l
he
so how do you achieve this?
r
if you use a username, keep in mind about a few things: - the user object that is returned will still have an email field. The value of this will be the username. - When sending reset password emails, it will by default try and send it to the username (and fail). So you will need to provide the callback to send the reset password email yourself (same goes for email verification if that is enabled)
l
ok
r
> so how do you achieve this? Do you want to call this in your own API or change our default ones to allow for username?
l
so I can set the username
usually it just sets the email
r
so in the form, you have the email and the username as the input?
l
yes
r
right. Which recipe are you using?
l
ThirdPartyEmailPassword Recipe
how do I add a username input
l
oh nice
r
You can add validators to the username input as well to make sure that it is unique
2 Views