This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Blocks a member from logging in to the site using an ID or email address.
To unblock the member and allow them to log in to the site, use the approve()
function.
function block(options: BlockOptions): Promise<void>;
Options for blocking a member from logging in.
import { authentication } from "wix-members.v2";
async function block(options) {
try {
const result = await authentication.block(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.