Skip to content

feat(expo): support custom logos in native AuthView#9163

Open
swolfand wants to merge 4 commits into
mainfrom
sam/mobile-590-expo-native-custom-logo
Open

feat(expo): support custom logos in native AuthView#9163
swolfand wants to merge 4 commits into
mainfrom
sam/mobile-590-expo-native-custom-logo

Conversation

@swolfand

@swolfand swolfand commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a logo prop to the Expo native AuthView, allowing apps to replace the dashboard-configured logo with arbitrary React Native content on Android and iOS.

The React element is mounted as the native view's single child and rehosted inside the Clerk Compose/SwiftUI logo slot while preserving its React Native layout dimensions. Callers retain control over sizing, spacing, and accessibility.

This ports the custom logo-view APIs introduced by clerk/clerk-android#801 and clerk/clerk-ios#520.

simulator_screenshot_382FAA65-2126-47AE-B6C1-F748B1F09FFB image

Resolves MOBILE-526

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jul 21, 2026 3:27am
swingset Ready Ready Preview, Comment Jul 21, 2026 3:27am

Request Review

@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c4b19ad

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

This PR includes changesets to release 1 package
Name Type
@clerk/expo 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

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Custom React Native logo content is now supported by Expo AuthView. The prop is typed and forwarded as a native child, hosted and resized through Android Compose and iOS SwiftUI, and covered by JavaScript and iOS tests. A patch changeset and CocoaPods test specification were added.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: mikepitre, wobsoriano, seanperez29

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% 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
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adding custom logos to the native AuthView.
Description check ✅ Passed The description matches the changeset and describes the new logo prop and native rehosting behavior.

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9163

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9163

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9163

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9163

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: c4b19ad

@swolfand
swolfand requested review from mikepitre, seanperez29 and wobsoriano and removed request for wobsoriano July 14, 2026 22:50
@swolfand
swolfand marked this pull request as ready for review July 14, 2026 22:50
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-21T03:27:53.674Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 1
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 1

@clerk/expo

Current version: 3.7.8
Recommended bump: MINOR → 3.8.0

Subpath ./native

🟢 Additions (1)

Added: AuthViewProps.logo
+ logo?: ReactElement;

Added property AuthViewProps.logo


Report generated by Break Check

Last ran on c4b19ad.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/expo/ios/ClerkAuthNativeView.swift`:
- Around line 81-87: Update the logoBoundsObservation callback and its
asynchronous main-thread block so queued work reads the current logo view bounds
when it executes, rather than applying the asynchronously captured bounds.size.
Continue validating the view identity and only update logoSize and call
setNeedsHostedViewUpdate when the latest size differs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 62273dd8-3af2-454f-acf8-27bbd45b925c

📥 Commits

Reviewing files that changed from the base of the PR and between 99ac79f and 380a291.

📒 Files selected for processing (7)
  • .changeset/expo-native-custom-logo.md
  • packages/expo/android/src/main/java/expo/modules/clerk/ClerkAuthViewModule.kt
  • packages/expo/ios/ClerkAuthNativeView.swift
  • packages/expo/ios/ClerkNativeBridge.swift
  • packages/expo/src/native/AuthView.tsx
  • packages/expo/src/native/AuthView.types.ts
  • packages/expo/src/native/__tests__/AuthView.test.tsx

Comment thread packages/expo/ios/ClerkAuthNativeView.swift Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/expo/ios/Tests/ClerkAuthNativeViewPaperTests.swift (1)

1-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Exercise both React Native architectures in this test.

ClerkAuthNativeView.swift has separate Paper and Fabric child-lifecycle paths, but this entire test is excluded when RCT_NEW_ARCH_ENABLED is set. Add equivalent Fabric coverage so the new-architecture path cannot regress while the suite remains green.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/expo/ios/Tests/ClerkAuthNativeViewPaperTests.swift` around lines 1 -
30, Extend ClerkAuthNativeViewPaperTests coverage to also exercise the Fabric
child-lifecycle path when RCT_NEW_ARCH_ENABLED is enabled. Add equivalent
assertions for inserting, updating, and removing the React child through
ClerkAuthNativeView’s Fabric APIs, while preserving the existing Paper test and
its host-hierarchy expectations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/expo/ios/Tests/ClerkAuthNativeViewPaperTests.swift`:
- Around line 1-30: Extend ClerkAuthNativeViewPaperTests coverage to also
exercise the Fabric child-lifecycle path when RCT_NEW_ARCH_ENABLED is enabled.
Add equivalent assertions for inserting, updating, and removing the React child
through ClerkAuthNativeView’s Fabric APIs, while preserving the existing Paper
test and its host-hierarchy expectations.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 020949b2-d4fc-4b4b-88fa-ca88393e9722

📥 Commits

Reviewing files that changed from the base of the PR and between bfd4927 and 9387c03.

📒 Files selected for processing (4)
  • packages/expo/ios/ClerkAuthNativeView.swift
  • packages/expo/ios/ClerkExpo.podspec
  • packages/expo/ios/ClerkNativeBridge.swift
  • packages/expo/ios/Tests/ClerkAuthNativeViewPaperTests.swift

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.

2 participants