1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00

fix: update mfa sdk method name

This commit is contained in:
Torsten Dittmann 2024-02-21 18:08:22 +01:00
parent 6cd456a35e
commit e7f94d7095
15 changed files with 22 additions and 27 deletions

View file

@ -25,7 +25,7 @@ return [
'family' => APP_PLATFORM_CLIENT,
'prism' => 'javascript',
'source' => \realpath(__DIR__ . '/../sdks/client-web'),
'gitUrl' => 'git@github.com:appwrite/sdk-for-web.git',
'gitUrl' => 'https://github.com/appwrite/sdk-for-web.git',
'gitRepoName' => 'sdk-for-web',
'gitUserName' => 'appwrite',
'gitBranch' => 'dev',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,18 +1,13 @@
import { Client, AuthenticatorProvider, Account } from "appwrite";
import { Client, Account, AuthenticationFactor } from "appwrite";
const client = new Client();
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const result = await account.createChallenge(
AuthenticationFactor.Totp // factor
);
const promise = account.createChallenge(AuthenticatorProvider.Totp);
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
console.log(response);

View file

@ -129,7 +129,7 @@ abstract class Format
return 'AuthenticatorType';
}
break;
case 'create2FAChallenge':
case 'createChallenge':
switch ($param) {
case 'factor':
return 'AuthenticationFactor';