AuthContainer.signup() method
Sign up new user.
Signature:
signup(loginIDs: {
[key: string]: string;
}[] | {
[key: string]: string;
}, password: string, options?: {
metadata?: JSONObject;
}): Promise<User>;
Parameters
Parameter | Type | Description |
---|---|---|
loginIDs | { [key: string]: string; }[] | { [key: string]: string; } | Login IDs |
password | string | Password |
options | { metadata?: JSONObject; } | Sign up options |
Returns:
Promise<User>
Example
// Signup with email and password
await signup({"email": "test@example.com"}, "password");
// Signup with email, username, and password
await signup(
[{"email": "test@example.com"}, {"username": "test"}],
"password"
);
// Signup with email, password, and custom metadata
await signup(
{"email": "test@example.com"},
"password",
{"metadata": {"accepted_tos": true}}
);