Skip to content

Commit 6e68a65

Browse files
committed
chore: update for RC version
1 parent b012adc commit 6e68a65

File tree

324 files changed

+29619
-0
lines changed

Some content is hidden

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

324 files changed

+29619
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
9+
10+
$account = new Account($client);
11+
12+
$result = $account->createAnonymousSession();
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+
6+
$client = (new Client())
7+
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
9+
10+
$account = new Account($client);
11+
12+
$result = $account->createEmailPasswordSession(
13+
14+
password: 'password'
15+
);
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://cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
9+
10+
$account = new Account($client);
11+
12+
$result = $account->createEmailToken(
13+
userId: '<USER_ID>',
14+
15+
phrase: false // optional
16+
);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
9+
10+
$account = new Account($client);
11+
12+
$result = $account->createJWT();
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+
6+
$client = (new Client())
7+
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
9+
10+
$account = new Account($client);
11+
12+
$result = $account->createMagicURLToken(
13+
userId: '<USER_ID>',
14+
15+
url: 'https://example.com', // optional
16+
phrase: false // optional
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+
use Appwrite\Enums\AuthenticatorType;
6+
7+
$client = (new Client())
8+
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
->setProject('&lt;YOUR_PROJECT_ID&gt;') // 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://cloud.appwrite.io/v1') // Your API Endpoint
9+
->setProject('&lt;YOUR_PROJECT_ID&gt;'); // 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://cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('&lt;YOUR_PROJECT_ID&gt;') // Your project ID
9+
->setSession(''); // The user session to authenticate with
10+
11+
$account = new Account($client);
12+
13+
$result = $account->createMfaRecoveryCodes();
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
use Appwrite\Enums\OAuthProvider;
6+
7+
$client = (new Client())
8+
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
->setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
10+
11+
$account = new Account($client);
12+
13+
$result = $account->createOAuth2Token(
14+
provider: OAuthProvider::AMAZON(),
15+
success: 'https://example.com', // optional
16+
failure: 'https://example.com', // optional
17+
scopes: [] // optional
18+
);
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+
6+
$client = (new Client())
7+
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
9+
10+
$account = new Account($client);
11+
12+
$result = $account->createPhoneToken(
13+
userId: '<USER_ID>',
14+
phone: '+12065550100'
15+
);

0 commit comments

Comments
 (0)