Skip to content

fix(expo): sync iOS native client via ClerkKit#8851

Draft
mikepitre wants to merge 5 commits into
mainfrom
mike/expo-ios-keychain-service-sync
Draft

fix(expo): sync iOS native client via ClerkKit#8851
mikepitre wants to merge 5 commits into
mainfrom
mike/expo-ios-keychain-service-sync

Conversation

@mikepitre

@mikepitre mikepitre commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes iOS native UI after a user signs in through the Expo JS SDK first.

In that flow, JS has the signed-in client token, but ClerkKit can still have stale native client state. The Expo bridge now passes the JS token to ClerkKit through the FrameworkIntegration SPI from clerk/clerk-ios#477.

This also removes the bridge's manual keychain handling. ClerkKit now owns the device-token write, cached-client invalidation, and refresh without a stale x-clerk-client-id; Expo only hands over the token and reads it back through ClerkKit.

Do not merge until clerk-ios is released with that SPI and CLERK_IOS_VERSION is bumped.

Changes

  • Use Clerk.shared.updateDeviceToken(token) and Clerk.shared.deviceToken in the iOS bridge.
  • Remove direct keychain reads/writes from the iOS bridge.
  • Notify useNativeSession() after native client sync points so it does not show stale session state.
  • Add focused tests for native session notifications.

Testing

pnpm --filter @clerk/expo test
pnpm --filter @clerk/expo format:check
pnpm --filter @clerk/expo lint

lint passes with the existing 15 warnings.

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:

@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01f0177

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

@vercel

vercel Bot commented Jun 12, 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 Jun 13, 2026 4:32am
swingset Ready Ready Preview, Comment Jun 13, 2026 4:32am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 7d2118cf-27b0-46e5-84cd-b70aea719b32

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 01f0177

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant