[PR #7790] [MERGED] fix(passkey): use deleteVerificationByIdentifier for secondary-storage cleanup #15802

Closed
opened 2026-04-13 10:13:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7790
Author: @bytaesu
Created: 2/4/2026
Status: Merged
Merged: 2/4/2026
Merged by: @bytaesu

Base: canaryHead: 2026-02-04/fix/passkey-verification-cleanup


📝 Commits (1)

  • b786d5f fix(passkey): use deleteVerificationByIdentifier for secondary-storage cleanup

📊 Changes

2 files changed (+126 additions, -3 deletions)

View changed files

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

📄 Description

verifications created through secondary-storage do not have an id


Summary by cubic

Fixes passkey verification cleanup by using deleteVerificationByIdentifier so secondary-storage tokens (which don’t have an id) are removed after registration and authentication.

  • Bug Fixes

    • Replace deleteVerificationValue(data.id) with deleteVerificationByIdentifier(verificationToken) in registration and authentication routes to correctly clean up secondary-storage verifications.
  • Tests

    • Add a secondary-storage test that verifies the verification token is removed after successful passkey authentication.
    • Mock verifyAuthenticationResponse to simulate a valid response.

Written for commit b786d5f8c3. Summary will update 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/7790 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/4/2026 **Merged by:** [@bytaesu](https://github.com/bytaesu) **Base:** `canary` ← **Head:** `2026-02-04/fix/passkey-verification-cleanup` --- ### 📝 Commits (1) - [`b786d5f`](https://github.com/better-auth/better-auth/commit/b786d5f8c34a2c34c6c7418fcbcc050a2ea301be) fix(passkey): use deleteVerificationByIdentifier for secondary-storage cleanup ### 📊 Changes **2 files changed** (+126 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/passkey/src/passkey.test.ts` (+120 -1) 📝 `packages/passkey/src/routes.ts` (+6 -2) </details> ### 📄 Description verifications created through secondary-storage do not have an id <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes passkey verification cleanup by using deleteVerificationByIdentifier so secondary-storage tokens (which don’t have an id) are removed after registration and authentication. - **Bug Fixes** - Replace deleteVerificationValue(data.id) with deleteVerificationByIdentifier(verificationToken) in registration and authentication routes to correctly clean up secondary-storage verifications. - **Tests** - Add a secondary-storage test that verifies the verification token is removed after successful passkey authentication. - Mock verifyAuthenticationResponse to simulate a valid response. <sup>Written for commit b786d5f8c34a2c34c6c7418fcbcc050a2ea301be. Summary will update 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-04-13 10:13:57 -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#15802