[GH-ISSUE #3248] Add code info in phoneNumber callbackOnVerification #18169

Closed
opened 2026-04-15 16:33:05 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @irg1008 on GitHub (Jul 2, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3248

Is this suited for github?

  • Yes, this is suited for github

Hi! I use Prelude for sms verification and I use the phoneNumber hooks "sendOTP" and "callbackOnVerification" to send and then check with this external provider correct verification. "sendOTP" generates a code I can then use on the SMS text, but open auth verification I would need the code again to end the verification proccess with the provider.

It's this contemplated in some way. Woul dlove to be able to access the code at this point

Describe the solution you'd like

Simply adding the verified code in the "callbackOnVerification" callback

Describe alternatives you've considered

I am currently fetching the last code from database but since it's formatted like <code>:<attemps> it's a bit of a hassle

Additional context

Nothing, keep up the great work!! I'd do it my self if you like the idea

Originally created by @irg1008 on GitHub (Jul 2, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3248 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Hi! I use Prelude for sms verification and I use the phoneNumber hooks "sendOTP" and "callbackOnVerification" to send and then check with this external provider correct verification. "sendOTP" generates a code I can then use on the SMS text, but open auth verification I would need the code again to end the verification proccess with the provider. It's this contemplated in some way. Woul dlove to be able to access the code at this point ### Describe the solution you'd like Simply adding the verified code in the "callbackOnVerification" callback ### Describe alternatives you've considered I am currently fetching the last code from database but since it's formatted like <code\>:<attemps\> it's a bit of a hassle ### Additional context Nothing, keep up the great work!! I'd do it my self if you like the idea
GiteaMirror added the lockedenhancement labels 2026-04-15 16:33:05 -05:00
Author
Owner

@lunaperegrina commented on GitHub (Sep 28, 2025):

I really want this feature!

<!-- gh-comment-id:3342144715 --> @lunaperegrina commented on GitHub (Sep 28, 2025): I really want this feature!
Author
Owner

@dosubot[bot] commented on GitHub (Dec 28, 2025):

Hi, @irg1008. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested adding the verification code directly to the callbackOnVerification callback in the phoneNumber hooks.
  • This change aims to simplify integration with external SMS providers by avoiding the need to fetch and reformat the code from the database.
  • Another user, lunaperegrina, has shown strong support for this feature.
  • No maintainer responses or updates have been provided so far.

Next Steps:

  • Please let me know if this feature request is still relevant to the latest version of better-auth by commenting on this issue.
  • If I don’t hear back within 7 days, the issue will be automatically closed.

Thanks for your understanding and contribution!

<!-- gh-comment-id:3694857332 --> @dosubot[bot] commented on GitHub (Dec 28, 2025): Hi, @irg1008. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested adding the verification code directly to the `callbackOnVerification` callback in the phoneNumber hooks. - This change aims to simplify integration with external SMS providers by avoiding the need to fetch and reformat the code from the database. - Another user, lunaperegrina, has shown strong support for this feature. - No maintainer responses or updates have been provided so far. **Next Steps:** - Please let me know if this feature request is still relevant to the latest version of better-auth by commenting on this issue. - If I don’t hear back within 7 days, the issue will be automatically closed. Thanks for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#18169