[PR #3530] [CLOSED] feat(phone-number): exposing code on callbackOnVerification function #4867

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3530
Author: @Kinfe123
Created: 7/21/2025
Status: Closed

Base: mainHead: feat/onPhonenumberVerification-callback


📝 Commits (7)

  • ac07eb8 onphoneRequest verification callback
  • 6adb070 update
  • eddcb32 docs
  • 039e6cf docs
  • ef872cc Merge branch 'main' into feat/onPhonenumberVerification-callback
  • 6eba44c Merge branch 'main' into feat/onPhonenumberVerification-callback
  • 3161a39 Merge branch 'main' into feat/onPhonenumberVerification-callback

📊 Changes

3 files changed (+15 additions, -1 deletions)

View changed files

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

📄 Description

closes #2811

This helps on exposing the OTP in onPhoneNumberVerification avoids unnecessary internal lookups and gives developers the flexibility to integrate with custom verification flows and audits. It’s a pragmatic improvement that helps how this is used in prod.


Summary by cubic

Exposed the OTP code to the callbackOnVerification function in the phone number plugin, allowing custom verification flows without extra lookups.

  • Docs and Tests
  • Updated documentation and added tests to cover the new callback parameter.

🔄 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/3530 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 7/21/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/onPhonenumberVerification-callback` --- ### 📝 Commits (7) - [`ac07eb8`](https://github.com/better-auth/better-auth/commit/ac07eb869c9b3a055f2bfc16d13d5d0acc6d8397) onphoneRequest verification callback - [`6adb070`](https://github.com/better-auth/better-auth/commit/6adb070866e5ae4d25d976d74312dfae66d3798b) update - [`eddcb32`](https://github.com/better-auth/better-auth/commit/eddcb320062b92cf49c30c704c3b63aaba775604) docs - [`039e6cf`](https://github.com/better-auth/better-auth/commit/039e6cfd7573604894a8c0fcc761415a6db0f12a) docs - [`ef872cc`](https://github.com/better-auth/better-auth/commit/ef872cc3662884992ae5aaa5395c18b07ae64b1a) Merge branch 'main' into feat/onPhonenumberVerification-callback - [`6eba44c`](https://github.com/better-auth/better-auth/commit/6eba44ce7dba4208500a2c3faeb43ec4afd14e4f) Merge branch 'main' into feat/onPhonenumberVerification-callback - [`3161a39`](https://github.com/better-auth/better-auth/commit/3161a3929ca610ae35b3e1c96f8a8be9acf94623) Merge branch 'main' into feat/onPhonenumberVerification-callback ### 📊 Changes **3 files changed** (+15 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/phone-number.mdx` (+1 -1) 📝 `packages/better-auth/src/plugins/phone-number/index.ts` (+2 -0) 📝 `packages/better-auth/src/plugins/phone-number/phone-number.test.ts` (+12 -0) </details> ### 📄 Description closes #2811 This helps on exposing the OTP in onPhoneNumberVerification avoids unnecessary internal lookups and gives developers the flexibility to integrate with custom verification flows and audits. It’s a pragmatic improvement that helps how this is used in prod. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Exposed the OTP code to the callbackOnVerification function in the phone number plugin, allowing custom verification flows without extra lookups. - **Docs and Tests** - Updated documentation and added tests to cover the new callback parameter. <!-- 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:02:31 -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#4867