Appwite 1.5 support

This commit is contained in:
Jake Barnby
2024-03-08 10:44:03 +01:00
parent 1dacc5d3ef
commit 1a8d525cae
27 changed files with 341 additions and 160 deletions
@@ -6,6 +6,6 @@ Client client = Client()
Account account = Account(client);
MfaType result = await account.addAuthenticator(
MfaType result = await account.createMfaAuthenticator(
type: AuthenticatorType.totp,
);
@@ -6,6 +6,6 @@ Client client = Client()
Account account = Account(client);
MfaChallenge result = await account.createChallenge(
factor: AuthenticationFactor.totp,
MfaChallenge result = await account.createMfaChallenge(
factor: AuthenticationFactor.email,
);
@@ -0,0 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
MfaRecoveryCodes result = await account.createMfaRecoveryCodes();
@@ -6,7 +6,7 @@ Client client = Client()
Account account = Account(client);
await account.deleteAuthenticator(
await account.deleteMfaAuthenticator(
type: AuthenticatorType.totp,
otp: '<OTP>',
);
@@ -0,0 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
MfaRecoveryCodes result = await account.getMfaRecoveryCodes();
@@ -6,4 +6,4 @@ Client client = Client()
Account account = Account(client);
MfaFactors result = await account.listFactors();
MfaFactors result = await account.listMfaFactors();
@@ -6,7 +6,7 @@ Client client = Client()
Account account = Account(client);
User result = await account.verifyAuthenticator(
User result = await account.updateMfaAuthenticator(
type: AuthenticatorType.totp,
otp: '<OTP>',
);
@@ -6,7 +6,7 @@ Client client = Client()
Account account = Account(client);
result = await account.updateChallenge(
result = await account.updateMfaChallenge(
challengeId: '<CHALLENGE_ID>',
otp: '<OTP>',
);
@@ -0,0 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
MfaRecoveryCodes result = await account.updateMfaRecoveryCodes();