[PR #6431] [MERGED] fix(passkey): find passkey first before delete #32264

Closed
opened 2026-04-17 23:06:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6431
Author: @Bekacru
Created: 11/30/2025
Status: Merged
Merged: 11/30/2025
Merged by: @Bekacru

Base: canaryHead: fix/passkey


📝 Commits (6)

📊 Changes

3 files changed (+49 additions, -15 deletions)

View changed files

📝 packages/better-auth/src/api/routes/reset-password.ts (+1 -5)
📝 packages/passkey/src/index.ts (+15 -7)
📝 packages/passkey/src/passkey.test.ts (+33 -3)

📄 Description

Summary by cubic

Ensure passkey deletion checks the passkey exists and belongs to the signed-in user before removing it. This prevents unauthorized deletes and returns accurate errors.

  • Bug Fixes
    • Find passkey by id; return NOT_FOUND or UNAUTHORIZED as needed.
    • Delete using the validated id and return status: true.
    • Await reset-password email sending to surface errors.

Written for commit f34ab3db81. 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/6431 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 11/30/2025 **Status:** ✅ Merged **Merged:** 11/30/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/passkey` --- ### 📝 Commits (6) - [`aa13019`](https://github.com/better-auth/better-auth/commit/aa130194d3b2015f8c94bb7b8e5624ecf7a11599) fix(passkey): find passkey first before delete - [`b39ec56`](https://github.com/better-auth/better-auth/commit/b39ec56ad7ef9b4b5468c002eaedde2d79e1a276) return success - [`1ac69fd`](https://github.com/better-auth/better-auth/commit/1ac69fd0a7170835d7b3e77ce34fa411c5e2c0dc) Update packages/passkey/src/index.ts - [`2f16213`](https://github.com/better-auth/better-auth/commit/2f16213d14f3befc97264caa92ef13a9e02f678d) fix: test - [`c4d1943`](https://github.com/better-auth/better-auth/commit/c4d1943e7bbc13c281a36f03e7bfc4e459469044) fix: test - [`f34ab3d`](https://github.com/better-auth/better-auth/commit/f34ab3db819d7a6944e26f22ae243cc70bbe7ce4) remove void from reset password ### 📊 Changes **3 files changed** (+49 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/reset-password.ts` (+1 -5) 📝 `packages/passkey/src/index.ts` (+15 -7) 📝 `packages/passkey/src/passkey.test.ts` (+33 -3) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Ensure passkey deletion checks the passkey exists and belongs to the signed-in user before removing it. This prevents unauthorized deletes and returns accurate errors. - **Bug Fixes** - Find passkey by id; return NOT_FOUND or UNAUTHORIZED as needed. - Delete using the validated id and return status: true. - Await reset-password email sending to surface errors. <sup>Written for commit f34ab3db819d7a6944e26f22ae243cc70bbe7ce4. 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-04-17 23:06:20 -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#32264