[PR #4894] fix(phone-number): call callbackOnVerification when updatePhoneNumber is enabled #5644

Open
opened 2026-03-13 12:30:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4894
Author: @Kinfe123
Created: 9/25/2025
Status: 🔄 Open

Base: canaryHead: fix/phone-number-callback-on-verification


📝 Commits (3)

  • 9472c76 fix: call callbackOnVerification when updatePhoneNumber is enabled
  • e9912c6 lint
  • 9cc0a57 Merge branch 'canary' into fix/phone-number-callback-on-verification

📊 Changes

2 files changed (+85 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/phone-number/index.ts (+9 -0)
📝 packages/better-auth/src/plugins/phone-number/phone-number.test.ts (+76 -0)

📄 Description

closes #4839


Summary by cubic

Ensure callbackOnVerification runs when verifying a new phone number with updatePhoneNumber enabled. This makes callbacks fire consistently on phone updates, not just initial verification.

  • Bug Fixes
    • Invoke callbackOnVerification after successful verify when updatePhoneNumber is true.
    • Added test to confirm callback is called and user phone fields are updated.

🔄 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/4894 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 9/25/2025 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `fix/phone-number-callback-on-verification` --- ### 📝 Commits (3) - [`9472c76`](https://github.com/better-auth/better-auth/commit/9472c7629fe926e36324c0360e45ab9ad38df58a) fix: call callbackOnVerification when updatePhoneNumber is enabled - [`e9912c6`](https://github.com/better-auth/better-auth/commit/e9912c6b67a077502ec71f62d9e32909ccb729bb) lint - [`9cc0a57`](https://github.com/better-auth/better-auth/commit/9cc0a57e5584cd4832b5b83ef201650e34ef28e0) Merge branch 'canary' into fix/phone-number-callback-on-verification ### 📊 Changes **2 files changed** (+85 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/phone-number/index.ts` (+9 -0) 📝 `packages/better-auth/src/plugins/phone-number/phone-number.test.ts` (+76 -0) </details> ### 📄 Description closes #4839 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Ensure callbackOnVerification runs when verifying a new phone number with updatePhoneNumber enabled. This makes callbacks fire consistently on phone updates, not just initial verification. - **Bug Fixes** - Invoke callbackOnVerification after successful verify when updatePhoneNumber is true. - Added test to confirm callback is called and user phone fields are updated. <!-- 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 12:30:17 -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#5644