[GH-ISSUE #1159] phoneNumber verifyOTP implementation #17253

Closed
opened 2026-04-15 15:18:53 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @reslear on GitHub (Jan 9, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1159

Is this suited for github?

  • Yes, this is suited for github

use our verification instead internal usage

Describe the solution you'd like

replace:

5dfa022439/packages/better-auth/src/plugins/phone-number/index.ts (L401-L422)

to use custom implementation

Describe alternatives you've considered

strangeб this function already be implemented past time https://github.com/better-auth/better-auth/issues/86

also have in docs:
CleanShot 2025-01-09 at 06 04 19@2x

Additional context

No response

Originally created by @reslear on GitHub (Jan 9, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1159 ### Is this suited for github? - [X] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. use our verification instead internal usage ### Describe the solution you'd like replace: https://github.com/better-auth/better-auth/blob/5dfa022439b5574a22297074d57f3bc6724ec4a3/packages/better-auth/src/plugins/phone-number/index.ts#L401-L422 to use custom implementation ### Describe alternatives you've considered strangeб this function already be implemented past time https://github.com/better-auth/better-auth/issues/86 also have in docs: ![CleanShot 2025-01-09 at 06 04 19@2x](https://github.com/user-attachments/assets/4f079e83-7152-4c9c-8a16-e69ba51d69ac) ### Additional context _No response_
GiteaMirror added the enhancementlocked labels 2026-04-15 15:18:53 -05:00
Author
Owner

@raymondpattend commented on GitHub (Feb 4, 2025):

+1

<!-- gh-comment-id:2634395890 --> @raymondpattend commented on GitHub (Feb 4, 2025): +1
Author
Owner

@vidhunv1 commented on GitHub (Mar 12, 2025):

need this! the sms provider I use do their own verification.

<!-- gh-comment-id:2719353721 --> @vidhunv1 commented on GitHub (Mar 12, 2025): need this! the sms provider I use do their own verification.
Author
Owner

@dosubot[bot] commented on GitHub (Jun 14, 2025):

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

Issue Summary:

  • You requested a change in the phone number verification process for better-auth.
  • Suggested a custom implementation over the current internal method.
  • References previous issue #86 where the function was discussed and implemented.
  • Support for this change from raymondpattend and vidhunv1, with vidhunv1 highlighting the need for flexibility due to their SMS provider's verification.

Next Steps:

  • Is this issue still relevant to the latest version of the better-auth repository? If so, please comment to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

<!-- gh-comment-id:2972847806 --> @dosubot[bot] commented on GitHub (Jun 14, 2025): Hi, @reslear. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You requested a change in the phone number verification process for better-auth. - Suggested a custom implementation over the current internal method. - References previous issue #86 where the function was discussed and implemented. - Support for this change from raymondpattend and vidhunv1, with vidhunv1 highlighting the need for flexibility due to their SMS provider's verification. **Next Steps:** - Is this issue still relevant to the latest version of the better-auth repository? If so, please comment to keep the discussion open. - Otherwise, this issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Author
Owner

@reslear commented on GitHub (Jun 16, 2025):

not stale

<!-- gh-comment-id:2976789531 --> @reslear commented on GitHub (Jun 16, 2025): not stale
Author
Owner

@Yarmeli commented on GitHub (Jul 24, 2025):

+1

I'd also like to use a sms provider that does their own code generation and verification

<!-- gh-comment-id:3111764501 --> @Yarmeli commented on GitHub (Jul 24, 2025): +1 I'd also like to use a sms provider that does their own code generation and verification
Author
Owner

@dosubot[bot] commented on GitHub (Oct 23, 2025):

Hi, @reslear. 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 replacing the current phoneNumber verifyOTP method with a custom verification process.
  • This request references a prior implementation discussed in issue #86.
  • Several users have supported this change, emphasizing the need to support SMS providers that manage their own verification.
  • The issue highlights demand for more flexible phone verification options within the plugin.
  • The issue remains unresolved and relevant as you have confirmed.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of better-auth by commenting here.
  • If I do not hear back within 7 days, the issue will be automatically closed.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3437838925 --> @dosubot[bot] commented on GitHub (Oct 23, 2025): Hi, @reslear. 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 replacing the current phoneNumber verifyOTP method with a custom verification process. - This request references a prior implementation discussed in issue #86. - Several users have supported this change, emphasizing the need to support SMS providers that manage their own verification. - The issue highlights demand for more flexible phone verification options within the plugin. - The issue remains unresolved and relevant as you have confirmed. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of better-auth by commenting here. - If I do not hear back within 7 days, the issue will be automatically closed. Thank you for your understanding and contribution!
Author
Owner

@reslear commented on GitHub (Oct 23, 2025):

not stale

<!-- gh-comment-id:3438025601 --> @reslear commented on GitHub (Oct 23, 2025): not stale
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#17253