[PR #6826] [MERGED] fix(passkey): use data.id instead of challengeId in deleteVerificationValue #6907

Closed
opened 2026-03-13 13:16:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6826
Author: @GautamBytes
Created: 12/17/2025
Status: Merged
Merged: 12/24/2025
Merged by: @himself65

Base: canaryHead: fix/passkey-delete-verification-id


📝 Commits (3)

  • 2edc552 fix(passkey): use data.id instead of challengeId in deleteVerificationValue
  • 769a7e4 Merge branch 'canary' into fix/passkey-delete-verification-id
  • d7c60d3 Merge branch 'canary' into fix/passkey-delete-verification-id

📊 Changes

1 file changed (+2 additions, -6 deletions)

View changed files

📝 packages/passkey/src/routes.ts (+2 -6)

📄 Description

Description

This PR fixes a bug in the passkey plugin where verifyPasskeyRegistration and verifyPasskeyAuthentication were incorrectly passing challengeId (the identifier string) to deleteVerificationValue.

The deleteVerificationValue method in the adapter interface expects the document's primary key (id), not the lookup identifier. This caused issues with database adapters that enforce strict ID validation or lookups by primary key (e.g., Convex).

Fixes #6816


Summary by cubic

Use data.id when calling deleteVerificationValue in passkey registration and authentication, instead of challengeId. This matches the adapter API (expects the primary key) and prevents errors in adapters with strict ID validation (e.g., Convex).

Written for commit d7c60d3977. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/6826 **Author:** [@GautamBytes](https://github.com/GautamBytes) **Created:** 12/17/2025 **Status:** ✅ Merged **Merged:** 12/24/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/passkey-delete-verification-id` --- ### 📝 Commits (3) - [`2edc552`](https://github.com/better-auth/better-auth/commit/2edc552d120d24e1dc0be26e916082fd095daf75) fix(passkey): use data.id instead of challengeId in deleteVerificationValue - [`769a7e4`](https://github.com/better-auth/better-auth/commit/769a7e44d2623c6d210757080136c8ad7c8786c7) Merge branch 'canary' into fix/passkey-delete-verification-id - [`d7c60d3`](https://github.com/better-auth/better-auth/commit/d7c60d397773bf006fd8d9fde38dd36155e22086) Merge branch 'canary' into fix/passkey-delete-verification-id ### 📊 Changes **1 file changed** (+2 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/passkey/src/routes.ts` (+2 -6) </details> ### 📄 Description ## Description This PR fixes a bug in the passkey plugin where `verifyPasskeyRegistration` and `verifyPasskeyAuthentication` were incorrectly passing `challengeId` (the identifier string) to `deleteVerificationValue`. The `deleteVerificationValue` method in the adapter interface expects the document's primary key (`id`), not the lookup identifier. This caused issues with database adapters that enforce strict ID validation or lookups by primary key (e.g., Convex). ## Related Issue Fixes #6816 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Use data.id when calling deleteVerificationValue in passkey registration and authentication, instead of challengeId. This matches the adapter API (expects the primary key) and prevents errors in adapters with strict ID validation (e.g., Convex). <sup>Written for commit d7c60d397773bf006fd8d9fde38dd36155e22086. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:16:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#6907