appwrite/docs/examples/1.5.x/client-web/examples/users/delete-authenticator.md
2024-02-06 01:40:51 +13:00

489 B

import { Client, AuthenticatorProvider, Users } from "appwrite";

const client = new Client();

const users = new Users(client);

client .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ;

const promise = users.deleteAuthenticator('[USER_ID]', AuthenticatorProvider.Totp, '[OTP]');

promise.then(function (response) { console.log(response); // Success }, function (error) { console.log(error); // Failure });