[GH-ISSUE #5305] Feature request: phoneNumber masked #27532

Open
opened 2026-04-17 18:35:34 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @reslear on GitHub (Oct 14, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/5305

Originally assigned to: @ping-maxwell on GitHub.

Is this suited for github?

  • Yes, this is suited for github

API currently returns full phone numbers, risking data leaks and privacy issues.

Describe the solution you'd like

Return masked numbers by default (e.g., +1 XXX XXX 12 34).
Full numbers only accessible via secure, authorized endpoints.

Describe alternatives you've considered

Frontend masking — insecure.

Encrypted full numbers — still exposed in transit.

Additional context

Improves privacy, aligns with GDPR and industry best practices.

Originally created by @reslear on GitHub (Oct 14, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/5305 Originally assigned to: @ping-maxwell on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. API currently returns full phone numbers, risking data leaks and privacy issues. ### Describe the solution you'd like Return masked numbers by default (e.g., +1 XXX XXX 12 34). Full numbers only accessible via secure, authorized endpoints. ### Describe alternatives you've considered Frontend masking — insecure. Encrypted full numbers — still exposed in transit. ### Additional context Improves privacy, aligns with GDPR and industry best practices.
GiteaMirror added the credentials label 2026-04-17 18:35:34 -05:00
Author
Owner

@ping-maxwell commented on GitHub (Oct 14, 2025):

Not a bad idea.
Until there is support, for now we recommend using hooks to mask the phone number

<!-- gh-comment-id:3402660414 --> @ping-maxwell commented on GitHub (Oct 14, 2025): Not a bad idea. Until there is support, for now we recommend using hooks to mask the phone number
Author
Owner

@dosubot[bot] commented on GitHub (Jan 13, 2026):

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 suggested that the API should return masked phone numbers by default to enhance privacy and comply with GDPR.
  • The maintainer, ping-maxwell, agreed with the idea but recommended using hooks to mask phone numbers as an interim solution.
  • You responded positively to this interim approach.
  • Native support for masked phone numbers by default has not yet been implemented.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of better-auth by commenting here.
  • If I don’t hear from you, this issue will be automatically closed in 7 days.

Thanks for your understanding and contribution!

<!-- gh-comment-id:3745193121 --> @dosubot[bot] commented on GitHub (Jan 13, 2026): 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 suggested that the API should return masked phone numbers by default to enhance privacy and comply with GDPR. - The maintainer, ping-maxwell, agreed with the idea but recommended using hooks to mask phone numbers as an interim solution. - You responded positively to this interim approach. - Native support for masked phone numbers by default has not yet been implemented. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of better-auth by commenting here. - If I don’t hear from you, this issue will be automatically closed in 7 days. Thanks for your understanding and contribution!
Author
Owner

@reslear commented on GitHub (Jan 13, 2026):

@dosubot not stale

<!-- gh-comment-id:3745282167 --> @reslear commented on GitHub (Jan 13, 2026): @dosubot 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#27532