Skip to content

feat: SDK update for version 18.4.0 - #120

Merged
ChiragAgg5k merged 1 commit into
mainfrom
release/18.4.0
Oct 12, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
release/18.4.0

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 18.4.0.

What's Changed

  • Added: account passkey methods listPasskeys, createPasskey, getPasskey, updatePasskey, deletePasskey and updatePasskeyVerification
  • Added: account.createPasskeyToken and account.updatePasskeyToken for passkey sign-in
  • Added: users.listPasskeys, users.getPasskey, users.updatePasskey and users.deletePasskey
  • Added: project.updatePasskeyPolicy to configure passkey sign-in
  • Added: Passkey, PasskeyList, PasskeyChallenge and TokenSecret models

Passkeys only, patched onto main: the diff of the SDK generated with and without the passkey methods, three-way merged onto the release. Everything else on the release is unchanged, including its X-Appwrite-Response-Format.

@hansi-codes

hansi-codes Bot commented Oct 12, 2026

Copy link
Copy Markdown

🔵 Tier A · Mergeable after minor fixes

The two findings are minor documentation issues: the WebAuthn instructions omit the required parsing of JSON options.

Adds passkey registration, sign-in, management, and project-policy methods, along with the associated response models. Updates the SDK version metadata and changelog and adds examples for the new APIs.

Verdict New comments Fixed Still open
✅ Approved 2 0 0
Finding Where
🟡 Document parsing the registration options before WebAuthn src/services/account.ts:2798
🟡 Document parsing the sign-in options before WebAuthn src/services/account.ts:5669
Fix with agent prompt
### Issue 1
src/services/account.ts:2798
**Document parsing the registration options before WebAuthn**

The returned `publicKey` is JSON-form WebAuthn options, so its encoded challenge and user ID must be converted with `PublicKeyCredential.parseCreationOptionsFromJSON()` before calling `navigator.credentials.create()`; passing the raw values will fail. The model documentation already describes this conversion, but this method's guidance omits it.

### Issue 2
src/services/account.ts:5669
**Document parsing the sign-in options before WebAuthn**

The returned `publicKey` is JSON-form WebAuthn options, so its encoded challenge must be converted with `PublicKeyCredential.parseRequestOptionsFromJSON()` before calling `navigator.credentials.get()`; passing the raw values will fail. Please include that step in the sign-in instructions.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
📂 Walkthrough · 11
File Change
CHANGELOG.md Documents the 18.4.0 passkey additions.
README.md Updates the CDN example to version 18.4.0.
docs/examples/account/*.md Adds examples for account passkey registration, management, and token flows.
docs/examples/users/*.md Adds examples for user passkey management.
docs/examples/project/update-passkey-policy.md Adds an example for configuring the passkey relying-party ID.
package.json, package-lock.json Bumps the package version to 18.4.0.
src/client.ts Updates the SDK version request header.
src/models.ts Adds passkey challenge, passkey list, passkey, and token secret models.
src/services/account.ts Adds account passkey management and passkey sign-in methods.
src/services/project.ts Adds the passkey policy update method.
src/services/users.ts Adds user passkey listing and management methods.

Reviewed 26dd7ee · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Tier A · Looks good to merge. Summary

Comment thread src/services/account.ts
}

/**
* Start registering a passkey for the currently logged in user. The session must have signed in or completed an MFA challenge within the last 10 minutes. Pass the returned `publicKey` options to `navigator.credentials.create()`, then complete the registration with [Update passkey verification](/docs/references/cloud/client-web/account#updatePasskeyVerification). The passkey stays pending until verified, and the challenge expires after 5 minutes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Document parsing the registration options before WebAuthn

The returned publicKey is JSON-form WebAuthn options, so its encoded challenge and user ID must be converted with PublicKeyCredential.parseCreationOptionsFromJSON() before calling navigator.credentials.create(); passing the raw values will fail. The model documentation already describes this conversion, but this method's guidance omits it.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/services/account.ts
Line: 2798

Comment:
**Document parsing the registration options before WebAuthn**

The returned `publicKey` is JSON-form WebAuthn options, so its encoded challenge and user ID must be converted with `PublicKeyCredential.parseCreationOptionsFromJSON()` before calling `navigator.credentials.create()`; passing the raw values will fail. The model documentation already describes this conversion, but this method's guidance omits it.

---

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

🟡 Minor · documentation · Reply if this doesn't apply.

Comment thread src/services/account.ts
}

/**
* Start signing in with a passkey. No email or user ID is needed: pass the returned `publicKey` options to `navigator.credentials.get()` and the user picks one of their passkeys. Then call [Update passkey token](/docs/references/cloud/client-web/account#updatePasskeyToken) with the credential to receive a token, and exchange it with [Create session](/docs/references/cloud/client-web/account#createSession). The challenge expires after 5 minutes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Document parsing the sign-in options before WebAuthn

The returned publicKey is JSON-form WebAuthn options, so its encoded challenge must be converted with PublicKeyCredential.parseRequestOptionsFromJSON() before calling navigator.credentials.get(); passing the raw values will fail. Please include that step in the sign-in instructions.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/services/account.ts
Line: 5669

Comment:
**Document parsing the sign-in options before WebAuthn**

The returned `publicKey` is JSON-form WebAuthn options, so its encoded challenge must be converted with `PublicKeyCredential.parseRequestOptionsFromJSON()` before calling `navigator.credentials.get()`; passing the raw values will fail. Please include that step in the sign-in instructions.

---

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

🟡 Minor · documentation · Reply if this doesn't apply.

@ChiragAgg5k
ChiragAgg5k merged commit 3003738 into main Oct 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant