banUser()
Bans a user. Their sessions are revoked and they cannot sign in until unbanned.
function banUser(userId: string): Promise<User>Parameters
userIdstringRequiredThe user to ban.
Usage
keyward is the backend client. Create it once with createKeywardClient({ secretKey }) and reuse it.
await keyward.users.banUser("user_2f9a");Returns
The updated User with banned: true.
Updated
What did you think of this content?