Skip to content

Commit 8f0dd23

Browse files
committed
Fix casing
1 parent e422a1b commit 8f0dd23

File tree

85 files changed

+2577
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2577
-274
lines changed

docs/account.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,33 @@ POST https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
112112
| type | string | **Required** Type of authenticator. Must be `totp` | |
113113

114114

115+
```http request
116+
POST https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
117+
```
118+
119+
** Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. **
120+
121+
### Parameters
122+
123+
| Field Name | Type | Description | Default |
124+
| --- | --- | --- | --- |
125+
| type | string | **Required** Type of authenticator. Must be `totp` | |
126+
127+
128+
```http request
129+
PUT https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
130+
```
131+
132+
** Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. **
133+
134+
### Parameters
135+
136+
| Field Name | Type | Description | Default |
137+
| --- | --- | --- | --- |
138+
| type | string | **Required** Type of authenticator. | |
139+
| otp | string | Valid verification token. | |
140+
141+
115142
```http request
116143
PUT https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
117144
```
@@ -139,6 +166,19 @@ DELETE https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
139166
| type | string | **Required** Type of authenticator. | |
140167

141168

169+
```http request
170+
DELETE https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
171+
```
172+
173+
** Delete an authenticator for a user by ID. **
174+
175+
### Parameters
176+
177+
| Field Name | Type | Description | Default |
178+
| --- | --- | --- | --- |
179+
| type | string | **Required** Type of authenticator. | |
180+
181+
142182
```http request
143183
POST https://cloud.appwrite.io/v1/account/mfa/challenge
144184
```
@@ -152,6 +192,33 @@ POST https://cloud.appwrite.io/v1/account/mfa/challenge
152192
| factor | string | Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. | |
153193

154194

195+
```http request
196+
POST https://cloud.appwrite.io/v1/account/mfa/challenge
197+
```
198+
199+
** Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. **
200+
201+
### Parameters
202+
203+
| Field Name | Type | Description | Default |
204+
| --- | --- | --- | --- |
205+
| factor | string | Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. | |
206+
207+
208+
```http request
209+
PUT https://cloud.appwrite.io/v1/account/mfa/challenge
210+
```
211+
212+
** Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. **
213+
214+
### Parameters
215+
216+
| Field Name | Type | Description | Default |
217+
| --- | --- | --- | --- |
218+
| challengeId | string | ID of the challenge. | |
219+
| otp | string | Valid verification token. | |
220+
221+
155222
```http request
156223
PUT https://cloud.appwrite.io/v1/account/mfa/challenge
157224
```
@@ -173,6 +240,20 @@ GET https://cloud.appwrite.io/v1/account/mfa/factors
173240
** List the factors available on the account to be used as a MFA challange. **
174241

175242

243+
```http request
244+
GET https://cloud.appwrite.io/v1/account/mfa/factors
245+
```
246+
247+
** List the factors available on the account to be used as a MFA challange. **
248+
249+
250+
```http request
251+
GET https://cloud.appwrite.io/v1/account/mfa/recovery-codes
252+
```
253+
254+
** Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes. **
255+
256+
176257
```http request
177258
GET https://cloud.appwrite.io/v1/account/mfa/recovery-codes
178259
```
@@ -187,6 +268,20 @@ POST https://cloud.appwrite.io/v1/account/mfa/recovery-codes
187268
** Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. **
188269

189270

271+
```http request
272+
POST https://cloud.appwrite.io/v1/account/mfa/recovery-codes
273+
```
274+
275+
** Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. **
276+
277+
278+
```http request
279+
PATCH https://cloud.appwrite.io/v1/account/mfa/recovery-codes
280+
```
281+
282+
** Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes. **
283+
284+
190285
```http request
191286
PATCH https://cloud.appwrite.io/v1/account/mfa/recovery-codes
192287
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
use Appwrite\Enums\AuthenticatorType;
6+
7+
$client = (new Client())
8+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
9+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
10+
->setSession(''); // The user session to authenticate with
11+
12+
$account = new Account($client);
13+
14+
$result = $account->createMFAAuthenticator(
15+
type: AuthenticatorType::TOTP()
16+
);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
use Appwrite\Enums\AuthenticationFactor;
6+
7+
$client = (new Client())
8+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
9+
->setProject('<YOUR_PROJECT_ID>'); // Your project ID
10+
11+
$account = new Account($client);
12+
13+
$result = $account->createMFAChallenge(
14+
factor: AuthenticationFactor::EMAIL()
15+
);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
10+
11+
$account = new Account($client);
12+
13+
$result = $account->createMFARecoveryCodes();
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
use Appwrite\Enums\AuthenticatorType;
6+
7+
$client = (new Client())
8+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
9+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
10+
->setSession(''); // The user session to authenticate with
11+
12+
$account = new Account($client);
13+
14+
$result = $account->deleteMFAAuthenticator(
15+
type: AuthenticatorType::TOTP()
16+
);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
10+
11+
$account = new Account($client);
12+
13+
$result = $account->getMFARecoveryCodes();
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
10+
11+
$account = new Account($client);
12+
13+
$result = $account->listMFAFactors();
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
use Appwrite\Enums\AuthenticatorType;
6+
7+
$client = (new Client())
8+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
9+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
10+
->setSession(''); // The user session to authenticate with
11+
12+
$account = new Account($client);
13+
14+
$result = $account->updateMFAAuthenticator(
15+
type: AuthenticatorType::TOTP(),
16+
otp: '<OTP>'
17+
);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
10+
11+
$account = new Account($client);
12+
13+
$result = $account->updateMFAChallenge(
14+
challengeId: '<CHALLENGE_ID>',
15+
otp: '<OTP>'
16+
);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
10+
11+
$account = new Account($client);
12+
13+
$result = $account->updateMFARecoveryCodes();

0 commit comments

Comments
 (0)