[PR #7794] [MERGED] fix: standardize name field masking as an empty string #15804

Closed
opened 2026-04-13 10:14:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7794
Author: @bytaesu
Created: 2/4/2026
Status: Merged
Merged: 2/9/2026
Merged by: @bytaesu

Base: canaryHead: cursor/name-field-standardization-45fd


📝 Commits (5)

  • 7140bc0 fix: standardize all masked name field values to empty string
  • 6c06fca fix: keep valid name fallbacks, only use empty string as final fallback
  • dfff394 chore: restore comment
  • 0c95344 fix: more clearer fallbacks
  • deb161d Merge branch 'canary' into cursor/name-field-standardization-45fd

📊 Changes

17 files changed (+32 additions, -36 deletions)

View changed files

📝 packages/better-auth/src/api/routes/callback.ts (+1 -1)
📝 packages/better-auth/src/plugins/oauth-proxy/index.ts (+1 -1)
📝 packages/better-auth/src/social.test.ts (+2 -6)
📝 packages/core/src/social-providers/apple.ts (+3 -3)
📝 packages/core/src/social-providers/cognito.ts (+6 -5)
📝 packages/core/src/social-providers/github.ts (+1 -1)
📝 packages/core/src/social-providers/gitlab.ts (+1 -1)
📝 packages/core/src/social-providers/huggingface.ts (+1 -1)
📝 packages/core/src/social-providers/kakao.ts (+1 -1)
📝 packages/core/src/social-providers/line.ts (+1 -1)
📝 packages/core/src/social-providers/naver.ts (+1 -1)
📝 packages/core/src/social-providers/notion.ts (+1 -1)
📝 packages/core/src/social-providers/paybin.ts (+1 -5)
📝 packages/core/src/social-providers/polar.ts (+1 -1)
📝 packages/core/src/social-providers/tiktok.ts (+2 -1)
📝 packages/core/src/social-providers/vercel.ts (+1 -1)
📝 packages/sso/src/routes/sso.ts (+7 -5)

📄 Description

Standardize all masked name field values to "" because the name field is required.


Slack Thread

Open in Cursor Open in Web


Summary by cubic

Standardized masked name values to "" across OAuth, OIDC, and SAML flows. Removed email and placeholder fallbacks; keep real username-style fields when available.

  • Bug Fixes

    • Default name to "" when no real name is provided; removed fallbacks like email, "User", "Notion User", and " ".
    • Preserve valid alternatives (login, preferred_username, nickname, displayName, SAML nameID); updated Apple provider and tests to expect "" when missing.
  • Migration

    • Do not assume name is non-empty; handle "" in UI and validations.
    • If a display value is needed, compute it client-side (e.g., initials or email).

Written for commit deb161d42d. Summary will update on new commits.


🔄 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/7794 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/9/2026 **Merged by:** [@bytaesu](https://github.com/bytaesu) **Base:** `canary` ← **Head:** `cursor/name-field-standardization-45fd` --- ### 📝 Commits (5) - [`7140bc0`](https://github.com/better-auth/better-auth/commit/7140bc0391ea4c2eee7b93923df78b851de63056) fix: standardize all masked name field values to empty string - [`6c06fca`](https://github.com/better-auth/better-auth/commit/6c06fcab6ad7dcd3a80c6561d2f0b030172680cd) fix: keep valid name fallbacks, only use empty string as final fallback - [`dfff394`](https://github.com/better-auth/better-auth/commit/dfff394f4be0c16e22e7ddd812cb3218034e0ecc) chore: restore comment - [`0c95344`](https://github.com/better-auth/better-auth/commit/0c95344e48295d27cfd0462cddb3152b46f89aa5) fix: more clearer fallbacks - [`deb161d`](https://github.com/better-auth/better-auth/commit/deb161d42dacae3855f241214feb3c0886155750) Merge branch 'canary' into cursor/name-field-standardization-45fd ### 📊 Changes **17 files changed** (+32 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/callback.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/oauth-proxy/index.ts` (+1 -1) 📝 `packages/better-auth/src/social.test.ts` (+2 -6) 📝 `packages/core/src/social-providers/apple.ts` (+3 -3) 📝 `packages/core/src/social-providers/cognito.ts` (+6 -5) 📝 `packages/core/src/social-providers/github.ts` (+1 -1) 📝 `packages/core/src/social-providers/gitlab.ts` (+1 -1) 📝 `packages/core/src/social-providers/huggingface.ts` (+1 -1) 📝 `packages/core/src/social-providers/kakao.ts` (+1 -1) 📝 `packages/core/src/social-providers/line.ts` (+1 -1) 📝 `packages/core/src/social-providers/naver.ts` (+1 -1) 📝 `packages/core/src/social-providers/notion.ts` (+1 -1) 📝 `packages/core/src/social-providers/paybin.ts` (+1 -5) 📝 `packages/core/src/social-providers/polar.ts` (+1 -1) 📝 `packages/core/src/social-providers/tiktok.ts` (+2 -1) 📝 `packages/core/src/social-providers/vercel.ts` (+1 -1) 📝 `packages/sso/src/routes/sso.ts` (+7 -5) </details> ### 📄 Description Standardize all masked `name` field values to `""` because the `name` field is required. --- [Slack Thread](https://betterauth.slack.com/archives/C0A8B5BARUK/p1770194913682979?thread_ts=1770194913.682979&cid=C0A8B5BARUK) <a href="https://cursor.com/background-agent?bcId=bc-14f93a81-3ca4-5126-b1ff-21c7e963ed38"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-14f93a81-3ca4-5126-b1ff-21c7e963ed38"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Standardized masked name values to "" across OAuth, OIDC, and SAML flows. Removed email and placeholder fallbacks; keep real username-style fields when available. - **Bug Fixes** - Default name to "" when no real name is provided; removed fallbacks like email, "User", "Notion User", and " ". - Preserve valid alternatives (login, preferred_username, nickname, displayName, SAML nameID); updated Apple provider and tests to expect "" when missing. - **Migration** - Do not assume name is non-empty; handle "" in UI and validations. - If a display value is needed, compute it client-side (e.g., initials or email). <sup>Written for commit deb161d42dacae3855f241214feb3c0886155750. Summary will update on new commits.</sup> <!-- 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-04-13 10:14:01 -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#15804