Skip to content

fix(clerk-js): Show primary email or phone number in OAuth consent screen#7799

Open
wobsoriano wants to merge 3 commits intomainfrom
rob/USER-4496-show-primary-email-or-phone-core3
Open

fix(clerk-js): Show primary email or phone number in OAuth consent screen#7799
wobsoriano wants to merge 3 commits intomainfrom
rob/USER-4496-show-primary-email-or-phone-core3

Conversation

@wobsoriano
Copy link
Member

@wobsoriano wobsoriano commented Feb 7, 2026

Description

Fixes an issue where the OAuth consent screen displayed "undefined" for users who signed in with only a phone number (no email).

Before: "wants to access App on behalf of undefined"
After: "wants to access App on behalf of +13215551234"

Resolves USER-4496

Core 3 version of #7797

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

Bug Fixes

  • Fixed the OAuth consent screen no longer displaying "undefined" as the primary identifier when signing in with a phone number. The screen now correctly shows the user's phone number or email address in the consent prompt.

@changeset-bot
Copy link

changeset-bot bot commented Feb 7, 2026

🦋 Changeset detected

Latest commit: ed13c31

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Feb 7, 2026 2:54am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 7, 2026

📝 Walkthrough

Walkthrough

This pull request adds a changeset for a patch release and fixes a bug in the OAuthConsent component. The component's primary user identifier logic is updated to use a combined primaryIdentifier that prefers emailAddress and falls back to phoneNumber, replacing the previous emailAddress-only lookup. This modification ensures the OAuth consent screen displays the appropriate user identifier in the header subtitle when using a phone-number-only authentication flow, preventing "undefined" from appearing in the consent message.

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately describes the main change: fixing the OAuth consent screen to display the primary email or phone number instead of 'undefined'.
Linked Issues check ✅ Passed The pull request successfully resolves USER-4496 by displaying the primary identifier (email or phone) on the OAuth consent screen, eliminating the 'undefined' display issue.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the OAuth consent screen display issue. The changeset file and component modification are both scoped to resolving the identified problem.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 7, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7799

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7799

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7799

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7799

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7799

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7799

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7799

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7799

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7799

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7799

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7799

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7799

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7799

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7799

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7799

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7799

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7799

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7799

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7799

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7799

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7799

commit: ed13c31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant