mirror of
https://github.com/appwrite/sdk-for-flutter.git
synced 2026-04-07 19:27:41 +00:00
Appwite 1.5 support
This commit is contained in:
+1
-1
@@ -6,6 +6,6 @@ Client client = Client()
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
MfaType result = await account.addAuthenticator(
|
||||
MfaType result = await account.createMfaAuthenticator(
|
||||
type: AuthenticatorType.totp,
|
||||
);
|
||||
+2
-2
@@ -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();
|
||||
+1
-1
@@ -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();
|
||||
+1
-1
@@ -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>',
|
||||
);
|
||||
+1
-1
@@ -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();
|
||||
Reference in New Issue
Block a user