feat(expo): Chris/mobile 405 react native components release#7843
feat(expo): Chris/mobile 405 react native components release#7843chriscanin merged 100 commits intomainfrom
Conversation
- Implemented UserButton component to open UserProfileView on press. - Created UserProfile component for comprehensive profile management. - Integrated native ClerkExpo module for iOS functionality. - Updated ClerkProvider to configure Clerk iOS SDK. - Added exports for new components in the native index file. - Adjusted TypeScript configuration to include additional files. - Modified build process to temporarily skip declaration generation. - Updated dependencies in pnpm-lock.yaml for compatibility.
…d ClerkViewFactory
…ge-ios-to-a-native-module-that-is-available-in-the-expo
…profile management
…ge-android-to-a-native-module-that-is-available-in-the
…ling and UI presentation - Consolidated Clerk SDK initialization and session management in ClerkExpoModule. - Removed ClerkProfileActivity and replaced it with ClerkUserProfileActivity for better clarity and functionality. - Introduced ClerkViewFactory to manage creation of intents for authentication and user profile activities. - Enhanced error handling and promise management for asynchronous operations. - Updated SignIn and UserProfile components to synchronize native and JS session states effectively. - Improved user experience by ensuring the auth modal is always presented, allowing native UI to manage signed-in state. - Added backward-compatible wrappers for SignedIn and SignedOut components.
…and improved session handling
- Updated `clerk-android` versions in `build.gradle` to `0.1.30` for API and `0.1.4` for UI. - Added Kotlin metadata version check skip to address compatibility issues. - Introduced packaging exclusions for duplicate META-INF files in Android. - Enhanced `ClerkAuthActivity` to improve session handling and logging. - Updated `ClerkExpoModule` to include detailed logging for session retrieval. - Improved `ClerkUserProfileActivity` to handle sign-out detection and logging. - Refined `SignIn` and `UserProfile` components to prevent duplicate auth callbacks and improve user state management. - Added packaging exclusions in the Expo config plugin for Android to resolve dependency conflicts.
- Introduced AuthView component to handle sign-in and sign-up using native UI. - Added AuthView types for better type safety. - Removed deprecated SignIn component and its types. - Updated UserButton and UserProfileView components with enhanced documentation. - Refactored ClerkProvider to sync native sessions with JS SDK. - Adjusted TypeScript configurations for improved declaration generation.
…lement crash in React Native
… state management
- packages/expo/package.json: merge new exports (./types) and file entries (google, apple) - packages/expo/src/hooks/index.ts: use main's standard re-exports for useSignIn/useSignUp/useWaitlist - packages/expo/src/provider/singleton/createClerkInstance.ts: use @clerk/clerk-js import (not headless subpath) - packages/react/src/isomorphicClerk.ts: use main's ClerkUI loading pattern via options.ui
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: a42091f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
This comment has been minimized.
This comment has been minimized.
clerk-android-ui 1.0.8 is compiled with Kotlin 2.1.20 but its transitive dependency telemetry-api still ships Kotlin 2.3.x metadata. The library module needs the flag to compile against these deps.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
The kotlin-stdlib 2.3.10 is still pulled in transitively even with clerk-android-ui 1.0.9. The app-level config plugin must inject -Xskip-metadata-version-check into the app's kotlinOptions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
!snapshot |
This comment has been minimized.
This comment has been minimized.
…ad of standardBrowser Replace the `standardBrowser !== false` check with an explicit `experimental.runtimeEnvironment === 'headless'` opt-in for the `loadHeadlessClerk` path. This ensures only Expo native takes the headless initialization path, while chrome-extension and all other SDKs continue using `getEntryChunks` (matching main branch behavior). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Yes, Maestro is a great option for E2E testing — it also has an MCP server that enables automated visual verification during development. I think the testing story here will be Maestro for E2E/integration tests paired with Jest for unit tests. @swolfand and I will work on getting that workflow set up. |
Setup is now handled automatically by the config plugin.
|
!snapshot |
This comment has been minimized.
This comment has been minimized.
| const [nativeAuthState, setNativeAuthState] = useState<NativeAuthStateEvent | null>(null); | ||
|
|
||
| useEffect(() => { | ||
| console.log(`[useNativeAuthEvents] INIT: isNativeSupported=${isNativeSupported}, ClerkExpo=${!!ClerkExpo}`); |
There was a problem hiding this comment.
should the console logs in this file be behind some debug flag? I'm guessing we don't want all of these logs by default
There was a problem hiding this comment.
Good catch, I have now wrapped all runtime console.* calls across the expo package behind DEV.
Do we want to guard against this one, or should this appear in production: 225abee
This was here from before, and did not have a DEV guard. Was not sure if this is supposed to be in production or not, but seems like we should not be surfacing console.log in production.
Wrap all runtime console.log/warn/error calls in the expo package with __DEV__ guards so they are stripped from production builds.
- Extract repeated native module init pattern into shared utils/native-module.ts - Add __DEV__ console.warn to all empty catch blocks for observability - Use unique ClerkRuntimeError codes for AuthView and InlineAuthView throws - Lift getInitials() out of UserButton component to module scope - Add __DEV__ logging to token cache and expo-web-browser catches in ClerkProvider - Delete slop README.md from native directory
|
Console logs behind Empty catches - Added Repeated native module snippet - Extracted to ClerkRuntimeError - The only thrown user-facing errors in the native components are in README.md slop - Deleted
|
|
!snapshot |
1 similar comment
|
!snapshot |
|
Hey @chriscanin - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.3.2-snapshot.v20260309193756 --save-exact
npm i @clerk/astro@3.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/backend@3.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/chrome-extension@3.1.0-snapshot.v20260309193756 --save-exact
npm i @clerk/clerk-js@6.1.0-snapshot.v20260309193756 --save-exact
npm i @clerk/dev-cli@0.1.1-snapshot.v20260309193756 --save-exact
npm i @clerk/expo@3.1.0-snapshot.v20260309193756 --save-exact
npm i @clerk/expo-passkeys@1.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/express@2.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/fastify@3.1.0-snapshot.v20260309193756 --save-exact
npm i @clerk/hono@0.1.0-snapshot.v20260309193756 --save-exact
npm i @clerk/localizations@4.1.0-snapshot.v20260309193756 --save-exact
npm i @clerk/msw@0.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/nextjs@7.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/nuxt@2.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/react@6.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/react-router@3.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/shared@4.1.0-snapshot.v20260309193756 --save-exact
npm i @clerk/tanstack-react-start@1.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/testing@2.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/ui@1.1.0-snapshot.v20260309193756 --save-exact
npm i @clerk/upgrade@2.0.2-snapshot.v20260309193756 --save-exact
npm i @clerk/vue@2.0.2-snapshot.v20260309193756 --save-exact |
Description
These changes can be tested by using the snapshot that will be commented in this PR discussion, and installing that into the expo quickstart repo on the branch:
chris/mobile-343-bridge-android-to-a-native-module-that-is-available-in-the(same branch name as here).
https://linear.app/clerk/issue/MOBILE-342/bridge-ios-to-a-native-module-that-is-available-in-the-expo-sdk
MOBILE-289
https://linear.app/clerk/issue/MOBILE-289/expo-google-universal-sign-in
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores