This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Registers a new site member.
The specified password
must be between 4 and 100 ASCII characters.
Note: The register()
function behaves differently depending on your site's member signup settings.
function register(
email: string,
password: string,
options: RegisterOptions,
): Promise<RegisterResponse>;
Login email address for the new site member.
Password the new site member will use to log in.
Must be 4 to 15 ASCII-printable characters.
Options for registering a new member.
import { authentication } from "wix-members.v2";
async function register(email, password, options) {
try {
const result = await authentication.register(email, password, options);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.