LouieMartin

    LouieMartin

    3 months ago
    Can I Sign up a user with like a function that takes parameters for username, password, email, ect... ex:
    ts
    signUp({
      username: 'LouieMartin',
      password: '123123',
    });
    r

    rp

    3 months ago
    hey!
    yea. technically, you can.
    LouieMartin

    LouieMartin

    3 months ago
    Hello, you responded fast today.
    r

    rp

    3 months ago
    well, i was online haha
    am*
    LouieMartin

    LouieMartin

    3 months ago
    he
    so how do you achieve this?
    r

    rp

    3 months ago
    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)
    LouieMartin

    LouieMartin

    3 months ago
    ok
    r

    rp

    3 months ago
    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?
    LouieMartin

    LouieMartin

    3 months ago
    so I can set the username
    usually it just sets the email
    r

    rp

    3 months ago
    so in the form, you have the email and the username as the input?
    LouieMartin

    LouieMartin

    3 months ago
    yes
    r

    rp

    3 months ago
    right. Which recipe are you using?
    LouieMartin

    LouieMartin

    3 months ago
    ThirdPartyEmailPassword Recipe
    how do I add a username input
    LouieMartin

    LouieMartin

    3 months ago
    oh nice
    r

    rp

    3 months ago
    You can add validators to the username input as well to make sure that it is unique