[PR #6419] [CLOSED] feat(phone-number): include verification code in phone number processing and tests #6653

Closed
opened 2026-03-13 13:06:53 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

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

Base: canaryHead: fix/phone-number-cb


📝 Commits (1)

  • 77d8795 feat(phone-number): include verification code in phone number processing and tests

📊 Changes

3 files changed (+14 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/phone-number/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/phone-number/phone-number.test.ts (+12 -0)
📝 packages/better-auth/src/plugins/phone-number/types.ts (+1 -0)

📄 Description

closes https://github.com/better-auth/better-auth/issues/2811


Summary by cubic

Pass the verification code to the phone number verification callback so apps can use the OTP during verification. Updated types and tests to support this.

  • New Features
    • Send code to callbackOnVerification: { phoneNumber, user, code }.
    • Extend PhoneNumberOptions types to include code.
    • Add tests verifying the callback receives phoneNumber, code, and user.

Written for commit 77d8795e80. 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/6419 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 11/30/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/phone-number-cb` --- ### 📝 Commits (1) - [`77d8795`](https://github.com/better-auth/better-auth/commit/77d8795e8079f293cac73980fa96d829a492a3e3) feat(phone-number): include verification code in phone number processing and tests ### 📊 Changes **3 files changed** (+14 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/phone-number/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/phone-number/phone-number.test.ts` (+12 -0) 📝 `packages/better-auth/src/plugins/phone-number/types.ts` (+1 -0) </details> ### 📄 Description closes https://github.com/better-auth/better-auth/issues/2811 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Pass the verification code to the phone number verification callback so apps can use the OTP during verification. Updated types and tests to support this. - **New Features** - Send code to callbackOnVerification: { phoneNumber, user, code }. - Extend PhoneNumberOptions types to include code. - Add tests verifying the callback receives phoneNumber, code, and user. <sup>Written for commit 77d8795e8079f293cac73980fa96d829a492a3e3. 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-03-13 13:06:53 -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#6653