[PR #5180] [MERGED] fix: Argument where of type TwoFactorWhereUniqueInput needs at least one of id arguments #22730

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5180
Author: @AlexStrNik
Created: 10/9/2025
Status: Merged
Merged: 10/11/2025
Merged by: @Bekacru

Base: mainHead: patch-2


📝 Commits (1)

  • a8e3bad fix: Argument where of type TwoFactorWhereUniqueInput needs at least one of id arguments

📊 Changes

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

View changed files

📝 packages/better-auth/src/plugins/two-factor/backup-codes/index.ts (+1 -1)

📄 Description

Fixes #2474


Summary by cubic

Switches two-factor backup code updates to use adapter.updateMany, removing the unique ID requirement and preventing the “TwoFactorWhereUniqueInput needs at least one of id arguments” error.
This ensures encrypted backup codes are stored without failing when a unique identifier isn’t available.


🔄 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/5180 **Author:** [@AlexStrNik](https://github.com/AlexStrNik) **Created:** 10/9/2025 **Status:** ✅ Merged **Merged:** 10/11/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `patch-2` --- ### 📝 Commits (1) - [`a8e3bad`](https://github.com/better-auth/better-auth/commit/a8e3bad565b429a0c706a7646bac8c8bed95dfc5) fix: Argument `where` of type TwoFactorWhereUniqueInput needs at least one of `id` arguments ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/two-factor/backup-codes/index.ts` (+1 -1) </details> ### 📄 Description Fixes #2474 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Switches two-factor backup code updates to use adapter.updateMany, removing the unique ID requirement and preventing the “TwoFactorWhereUniqueInput needs at least one of `id` arguments” error. This ensures encrypted backup codes are stored without failing when a unique identifier isn’t available. <!-- 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:14:26 -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#22730