[PR #4984] [CLOSED] fix: passkeys plugin response structure #22594

Closed
opened 2026-04-15 21:09:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4984
Author: @Bartek532
Created: 9/30/2025
Status: Closed

Base: canaryHead: fix-passkeys-plugin-response-structure


📝 Commits (5)

  • a1c11b9 fix: passkeys plugin response structure
  • cc6b14b fix: schema
  • eefa673 fix: tests
  • 581941e Merge branch 'canary' into fix-passkeys-plugin-response-structure
  • 410e652 Merge branch 'canary' into fix-passkeys-plugin-response-structure

📊 Changes

2 files changed (+170 additions, -146 deletions)

View changed files

📝 packages/better-auth/src/plugins/passkey/index.ts (+156 -132)
📝 packages/better-auth/src/plugins/passkey/passkey.test.ts (+14 -14)

📄 Description

In multiple places passkeys plugin expect to get a response with key data, but we're currently returning the data itself resulting in passkeys plugin not working at all.

Some examples:


Summary by cubic

Standardized passkeys plugin responses to return { data: ... } as the client expects. This fixes broken passkey flows caused by mismatched response shapes.

  • Bug Fixes
    • Wrapped options responses in { data } for passkey initialization endpoints.
    • Wrapped create-passkey response in { data } to align with client parsing.

🔄 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/4984 **Author:** [@Bartek532](https://github.com/Bartek532) **Created:** 9/30/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix-passkeys-plugin-response-structure` --- ### 📝 Commits (5) - [`a1c11b9`](https://github.com/better-auth/better-auth/commit/a1c11b9b03525cbc38f7dca2e8cdfc715a8ffb14) fix: passkeys plugin response structure - [`cc6b14b`](https://github.com/better-auth/better-auth/commit/cc6b14bea4f328aad98317a6123598513d2b86d0) fix: schema - [`eefa673`](https://github.com/better-auth/better-auth/commit/eefa673aef4ffee3708142e26e1568647a04c4a6) fix: tests - [`581941e`](https://github.com/better-auth/better-auth/commit/581941ec735196a211c0ee7504a63f7a857d602f) Merge branch 'canary' into fix-passkeys-plugin-response-structure - [`410e652`](https://github.com/better-auth/better-auth/commit/410e652c778b28dc16654f3d3488bd4a0acfbedb) Merge branch 'canary' into fix-passkeys-plugin-response-structure ### 📊 Changes **2 files changed** (+170 additions, -146 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/passkey/index.ts` (+156 -132) 📝 `packages/better-auth/src/plugins/passkey/passkey.test.ts` (+14 -14) </details> ### 📄 Description In multiple places passkeys plugin expect to get a response with key `data`, but we're currently returning the data itself resulting in passkeys plugin not working at all. Some examples: - https://github.com/better-auth/better-auth/blob/canary/packages/better-auth/src/plugins/passkey/client.ts#L111 - https://github.com/better-auth/better-auth/blob/canary/packages/better-auth/src/plugins/passkey/client.ts#L111 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Standardized passkeys plugin responses to return { data: ... } as the client expects. This fixes broken passkey flows caused by mismatched response shapes. - **Bug Fixes** - Wrapped options responses in { data } for passkey initialization endpoints. - Wrapped create-passkey response in { data } to align with client parsing. <!-- 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-15 21:09:33 -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#22594