Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## 28.0.0

* Breaking: removed `Account.listLogs` and the `Log`, `LogList` models
* Breaking: removed `Client.setDevKey`
* Breaking: SDK now targets Appwrite 2.3 (`X-Appwrite-Response-Format: 2.3.0`)
* Added: `Account.createIdTokenSession` for native Apple and Google sign-in with `IdTokenProvider` enum
* Added: `Account.createRecoveryOTP` and `Account.updateRecoveryOTP` for code-based password recovery
* Added: `Account.createEmailVerificationOTP` and `Account.updateEmailVerificationOTP`
* Added: `Kakao` and `Tiktok` values to `OAuthProvider`
* Added: `passwordPwned` field on `User` and `providerIdToken` field on `Identity`
* Fixed: empty-string required path parameters are rejected instead of sent to the API

## 27.0.0

* Breaking: `Execution.functionId` replaced by `resourceId` and `resourceType`
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Appwrite Web SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-web.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-2.0.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-2.3.0-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK targets Appwrite server version 2.0.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-web/releases) when APIs differ.
**This SDK targets Appwrite server version 2.3.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-web/releases) when APIs differ.

Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

Expand All @@ -33,7 +33,7 @@ import { Client, Account } from 'appwrite';
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:

```html
<script src="https://cdn.jsdelivr.net/npm/appwrite@27.0.0"></script>
<script src="https://cdn.jsdelivr.net/npm/appwrite@28.0.0"></script>
```

## Getting Started
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ const client = new Client()

const account = new Account(client);

const result = await account.listLogs({
queries: [], // optional
total: false, // optional
const result = await account.createEmailVerificationOTP({
phrase: false, // optional
});

console.log(result);
Expand Down
20 changes: 20 additions & 0 deletions docs/examples/account/create-id-token-session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
```javascript
import { Client, Account, IdTokenProvider } from 'appwrite';

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.createIdTokenSession({
provider: IdTokenProvider.Apple,
idToken: '<ID_TOKEN>',
nonce: '<NONCE>', // optional

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Apple nonce marked optional

This example uses Apple but labels the nonce optional. The new method documentation says Apple requires a nonce and rejects tokens requested without one. A developer who follows the comment and omits it may be unable to create a session.

Suggested change
nonce: '<NONCE>', // optional
nonce: '<NONCE>', // required for Apple
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/examples/account/create-id-token-session.md
Line: 13

Comment:
**Apple nonce marked optional**

This example uses Apple but labels the nonce optional. The new method documentation says Apple requires a nonce and rejects tokens requested without one. A developer who follows the comment and omits it may be unable to create a session.

```suggestion
    nonce: '<NONCE>', // required for Apple
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

accessToken: '<ACCESS_TOKEN>', // optional
accessTokenExpiry: 0, // optional
name: '<NAME>', // optional
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/account/create-recovery-otp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Account } from 'appwrite';

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.createRecoveryOTP({
email: 'email@example.com',
phrase: false, // optional
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/account/update-email-verification-otp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Account } from 'appwrite';

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.updateEmailVerificationOTP({
userId: '<USER_ID>',
secret: '<SECRET>',
});

console.log(result);
```
17 changes: 17 additions & 0 deletions docs/examples/account/update-recovery-otp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Account } from 'appwrite';

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

const result = await account.updateRecoveryOTP({
userId: '<USER_ID>',
secret: '<SECRET>',
password: 'password',
});

console.log(result);
```
Loading