[PR #3107] [CLOSED] Support multiple valid email OTPs #4649

Closed
opened 2026-03-13 11:54:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3107
Author: @Bekacru
Created: 6/20/2025
Status: Closed

Base: mainHead: codex/fix-issue-1568-in-better-auth


📝 Commits (1)

  • 5a0fe14 feat(email-otp): allow multiple otps

📊 Changes

4 files changed (+195 additions, -79 deletions)

View changed files

📝 packages/better-auth/src/__snapshots__/init.test.ts.snap (+1 -0)
📝 packages/better-auth/src/db/internal-adapter.ts (+28 -0)
📝 packages/better-auth/src/plugins/email-otp/email-otp.test.ts (+12 -1)
📝 packages/better-auth/src/plugins/email-otp/index.ts (+154 -78)

📄 Description

Summary

  • add findVerificationValues to internal adapter
  • add allowMultipleOTPs option
  • handle multiple OTPs when verifying email OTPs
  • test verifying old OTPs when multiple OTPs are allowed

Testing

  • pnpm test (fails: 7 test files failed)

https://chatgpt.com/codex/tasks/task_e_6855b1985f44832b9975c784f3e0346d


🔄 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/3107 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 6/20/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/fix-issue-1568-in-better-auth` --- ### 📝 Commits (1) - [`5a0fe14`](https://github.com/better-auth/better-auth/commit/5a0fe14f9eda561b180b38fcfd5b993e462d9282) feat(email-otp): allow multiple otps ### 📊 Changes **4 files changed** (+195 additions, -79 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/__snapshots__/init.test.ts.snap` (+1 -0) 📝 `packages/better-auth/src/db/internal-adapter.ts` (+28 -0) 📝 `packages/better-auth/src/plugins/email-otp/email-otp.test.ts` (+12 -1) 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+154 -78) </details> ### 📄 Description ## Summary - add `findVerificationValues` to internal adapter - add `allowMultipleOTPs` option - handle multiple OTPs when verifying email OTPs - test verifying old OTPs when multiple OTPs are allowed ## Testing - `pnpm test` *(fails: 7 test files failed)* ------ https://chatgpt.com/codex/tasks/task_e_6855b1985f44832b9975c784f3e0346d --- <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 11:54:02 -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#4649