diff --git a/.changeset/drop-expo-sdk-53.md b/.changeset/drop-expo-sdk-53.md new file mode 100644 index 00000000000..ac0c8d21597 --- /dev/null +++ b/.changeset/drop-expo-sdk-53.md @@ -0,0 +1,8 @@ +--- +'@clerk/expo': major +'@clerk/expo-passkeys': major +--- + +Drop support for Expo SDK 53. The minimum supported version is now Expo SDK 54. + +Expo maintains each SDK release for approximately one year and SDK 53 is now outside that window. Upgrade your app to Expo SDK 54 or later before updating these packages. diff --git a/.changeset/expo-google-signin-package.md b/.changeset/expo-google-signin-package.md new file mode 100644 index 00000000000..0246c49e5db --- /dev/null +++ b/.changeset/expo-google-signin-package.md @@ -0,0 +1,24 @@ +--- +'@clerk/expo': major +'@clerk/expo-google-signin': major +--- + +The native Google Sign-In module has moved out of `@clerk/expo` into a new optional package, `@clerk/expo-google-signin`. Apps that don't use `useSignInWithGoogle` no longer pull in the native Google Sign-In dependencies during prebuild. + +If you use native Google Sign-In, install the new package: + +```sh +npx expo install @clerk/expo-google-signin +``` + +add its config plugin alongside `@clerk/expo` in your app config: + +```json +{ + "expo": { + "plugins": ["@clerk/expo", "@clerk/expo-google-signin"] + } +} +``` + +then rebuild your native app. The `useSignInWithGoogle` hook is still exported from `@clerk/expo/google` and its API is unchanged; it now requires `@clerk/expo-google-signin` to provide the native module, and throws an actionable error if it is missing. diff --git a/.github/workflows/api-changes.yml b/.github/workflows/api-changes.yml index 66b72f6bb69..c6b00b6fa5e 100644 --- a/.github/workflows/api-changes.yml +++ b/.github/workflows/api-changes.yml @@ -18,6 +18,7 @@ on: - 'packages/chrome-extension/**' - 'packages/clerk-js/**' - 'packages/expo/**' + - 'packages/expo-google-signin/**' - 'packages/expo-passkeys/**' - 'packages/express/**' - 'packages/fastify/**' @@ -54,6 +55,7 @@ env: --filter=@clerk/chrome-extension --filter=@clerk/clerk-js --filter=@clerk/expo + --filter=@clerk/expo-google-signin --filter=@clerk/expo-passkeys --filter=@clerk/express --filter=@clerk/fastify diff --git a/.github/workflows/expo-native-build.yml b/.github/workflows/expo-native-build.yml index f7e1b879dd3..8903b647f0c 100644 --- a/.github/workflows/expo-native-build.yml +++ b/.github/workflows/expo-native-build.yml @@ -10,6 +10,7 @@ on: - 'integration/templates/expo-native/**' - 'integration/tests/expo-native/**' - 'packages/expo/**' + - 'packages/expo-google-signin/**' workflow_dispatch: permissions: @@ -74,11 +75,12 @@ jobs: - name: Install monorepo dependencies run: pnpm install --frozen-lockfile - - name: Build and pack @clerk/expo + - name: Build and pack Clerk packages run: | pnpm --filter @clerk/expo... build mkdir -p "$SDK_PACK_DIR" pnpm --filter @clerk/expo pack --pack-destination "$SDK_PACK_DIR" + pnpm --filter @clerk/expo-google-signin pack --pack-destination "$SDK_PACK_DIR" - name: Install fixture dependencies working-directory: ${{ env.FIXTURE_DIR }} @@ -88,8 +90,10 @@ jobs: run: | cp "package.sdk-$EXPO_SDK.json" package.json pnpm install --no-frozen-lockfile - SDK_TARBALL="$(ls "$SDK_PACK_DIR"/clerk-expo-*.tgz)" - pnpm add "$SDK_TARBALL" -w + # [0-9] keeps this glob off the clerk-expo-google-signin tarball. + SDK_TARBALL="$(ls "$SDK_PACK_DIR"/clerk-expo-[0-9]*.tgz)" + GOOGLE_SIGNIN_TARBALL="$(ls "$SDK_PACK_DIR"/clerk-expo-google-signin-*.tgz)" + pnpm add "$SDK_TARBALL" "$GOOGLE_SIGNIN_TARBALL" -w # expo-dev-client makes even release builds boot into the dev # launcher (unreachable Metro in CI), which stalls every Maestro # flow on a blank screen. Skip it on e2e jobs only. diff --git a/integration/templates/expo-native/App.tsx b/integration/templates/expo-native/App.tsx index 1f824007263..2031e9b4512 100644 --- a/integration/templates/expo-native/App.tsx +++ b/integration/templates/expo-native/App.tsx @@ -1,4 +1,5 @@ import { ClerkProvider, useAuth, useUser } from '@clerk/expo'; +import { useSignInWithGoogle } from '@clerk/expo/google'; import { AuthView, UserButton } from '@clerk/expo/native'; import { tokenCache } from '@clerk/expo/token-cache'; import { useState } from 'react'; @@ -13,7 +14,9 @@ if (!publishableKey) { function NativeBuildFixture() { const { isLoaded, isSignedIn, signOut } = useAuth({ treatPendingAsSignedOut: false }); const { user } = useUser(); + const { startGoogleAuthenticationFlow } = useSignInWithGoogle(); const [isAuthOpen, setIsAuthOpen] = useState(false); + const [googleResult, setGoogleResult] = useState(null); return ( @@ -29,6 +32,19 @@ function NativeBuildFixture() { title='Open native AuthView' onPress={() => setIsAuthOpen(true)} /> + {!isSignedIn && ( +