Feature request: phoneNumber masked #2123

Open
opened 2026-03-13 09:28:55 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @reslear on GitHub (Oct 14, 2025).

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). ### 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 enhancement label 2026-03-13 09:28:55 -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

@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!

@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

@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#2123