






























@clerk/expo now ships prebuilt native components (AuthView, UserButton, UserProfileView), native Google Sign-In, and Core-3 Signal APIs.

@clerk/expo 3.1 brings native UI components powered by SwiftUI (iOS) and Jetpack Compose (Android), native Google Sign-In, and the new Core-3 Signal API. This is a major version bump that requires Expo SDK 53+.
Three prebuilt native components are now available from @clerk/expo/native:
<AuthView /> renders the full sign-in/sign-up UI natively, with support for signIn, signUp, and signInOrUp modes. Session sync to the JS SDK happens automatically.<UserButton /> displays the user's avatar and opens the native profile modal on tap. It fills its parent container, so the parent controls the size and shape.<UserProfileView /> renders the profile management UI inline. For modal presentation, use the new useUserProfileModal() hook.All components use hook-based state management rather than callbacks. React to auth state changes with useAuth() in a useEffect:
These components require the @clerk/expo Expo config plugin, which automatically adds the clerk-ios and clerk-android native SDKs to your project. See the native components overview for setup and usage.
Google Sign-In now uses platform-native APIs instead of browser-based OAuth:
This is exposed via the NativeClerkGoogleSignIn TurboModule spec and integrated into the @clerk/expo config plugin. No extra packages are needed beyond configuring your Google OAuth credentials in the Clerk Dashboard.
@clerk/expo 3.1 ships with the Core-3 Signal API, which replaces the legacy setActive() pattern with reactive hooks:
Key changes from Core 2:
signIn.password(), signIn.emailCode.sendCode() replace signIn.attemptFirstFactor()signIn.finalize() replaces setActive({ session: signIn.createdSessionId })errors.fields.identifier?.message instead of try/catchSee the Expo quickstart and Core-3 upgrade guide for migration details.
Three new hooks are exported from @clerk/expo:
Follow the Expo quickstart to set up a new project with native components, or check the native components reference for the full API. The clerk-expo-quickstart repo has three example apps: JS-only, JS with native sign-in, and full native components.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。