Faroe.createUser()
Mapped to POST /users.
Creates a new user.
We highly recommend putting a Captcha or equivalent in front for spam and bot detection.
Definition
async function createUser(
password: string,
clientIP: string | null
): Promise<FaroeUser>
Parameters
password
: A valid password. Password strength is determined by checking it aginst past data leaks using the HaveIBeenPwned API.clientIP
Error codes
INVALID_DATA
: Malformed email address; invalid email address or password length.WEAK_PASSWORD
: The password is too weak.TOO_MANY_REQUESTS
: Exceeded rate limit.UNKNOWN_ERROR