Skip to content

feat(expo): Move Google Sign to a separate package#9015

Open
wobsoriano wants to merge 9 commits into
mainfrom
rob/mobile-560
Open

feat(expo): Move Google Sign to a separate package#9015
wobsoriano wants to merge 9 commits into
mainfrom
rob/mobile-560

Conversation

@wobsoriano

@wobsoriano wobsoriano commented Jun 26, 2026

Copy link
Copy Markdown
Member

Description

Moves the native Google Sign-In implementation out of @clerk/expo and into a new optional package, @clerk/expo-google-signin.

The Expo SDK currently includes the native Google Sign-In module even for apps that never call useSignInWithGoogle(). That means every Expo app using @clerk/expo can pick up the extra native iOS/Android Google Sign-In dependencies during prebuild/autolinking. This split keeps the native Google module opt-in while preserving the existing JS-facing API through a re-export.

This is intended for the next major version because apps using native Google Sign-In will need to install the new package and add its Expo config plugin.

Migration

Apps that use native Google Sign-In now need to install the new package:

npm install @clerk/expo-google-signin

and add its config plugin:

  {
    "expo": {
      "plugins": [
        "@clerk/expo",
        "@clerk/expo-google-signin"
      ]
    }
  }

The existing import path can continue to work:

import { useSignInWithGoogle } from '@clerk/expo/google';

but the native module is no longer included unless @clerk/expo-google-signin is installed and prebuilt into the app.

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:

Summary by CodeRabbit

  • New Features

    • Added a dedicated Google sign-in package for Expo.
    • Google sign-in is now available through a separate package and config plugin, with updated setup steps for apps.
  • Breaking Changes

    • Native Google sign-in support was moved out of the main Expo package.
    • Apps now need to install the new package, add its config plugin, and rebuild.
  • Bug Fixes

    • Improved native setup handling for iOS and Android.
    • Updated error messaging and examples to point to the new package.

@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01dae50

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

This PR includes changesets to release 2 packages
Name Type
@clerk/expo Major
@clerk/expo-google-signin Minor

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 Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 64b44178-4cbd-4b45-9c83-fc1a6e0722a8

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
📝 Walkthrough

Walkthrough

Native Google Sign-In functionality is extracted from @clerk/expo into a new standalone package, @clerk/expo-google-signin, including its own Android native module, Expo config plugin, hook implementation, and build/test tooling. @clerk/expo now re-exports from the new package and removes its native Google Sign-In code, dependencies, and module registration.

Changes

Google Sign-In package extraction

Layer / File(s) Summary
Changeset documentation
.changeset/expo-google-signin-package.md
Documents major bump to @clerk/expo, minor bump to @clerk/expo-google-signin, and required app migration steps.
New package manifest and native Android scaffolding
packages/expo-google-signin/package.json, expo-module.config.json, android/build.gradle, android/src/main/AndroidManifest.xml
Introduces package metadata, platform module registration, and native Android build configuration and manifest for the new package.
Expo config plugin for iOS URL scheme
packages/expo-google-signin/app.plugin.d.ts, app.plugin.js
Adds a config plugin that injects the Google Sign-In iOS URL scheme into Info.plist, wrapped with createRunOncePlugin.
Hook implementation, types, and entrypoint
packages/expo-google-signin/src/index.ts, global.d.ts, useSignInWithGoogle.ts, useSignInWithGoogle.shared.ts, useSignInWithGoogle.types.ts, useSignInWithGoogle.android.ts, useSignInWithGoogle.ios.ts, google-one-tap/ClerkGoogleOneTapSignIn.ts
Exposes useSignInWithGoogle and types from the package entrypoint, switches errorThrower to a locally built instance, removes the migration-warning function, adds SignUpUnsafeMetadata type, and updates docs/error text to reference the new package.
Build and test tooling
packages/expo-google-signin/tsconfig*.json, tsup.config.ts, vitest.config.mts, vitest.setup.mts, src/__tests__/useSignInWithGoogle.test.ts
Adds TypeScript, tsup, and Vitest configuration for the new package, updates test mock paths, and removes the obsolete migration-warning test.
Remove native Google Sign-In from @clerk/expo
packages/expo/android/build.gradle, expo-module.config.json, app.plugin.js, package.json, src/plugin/withClerkExpo.ts, src/types/index.ts, src/google/index.ts
Removes credential dependencies, module registration, and iOS URL-scheme plugin logic; adds @clerk/expo-google-signin as a dependency; rewires google/index.ts and type exports to re-export from the new package.

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

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant ClerkExpoGoogle as "`@clerk/expo/google`"
  participant ClerkGoogleSignIn as "`@clerk/expo-google-signin`"

  App->>ClerkExpoGoogle: import useSignInWithGoogle
  ClerkExpoGoogle->>ClerkGoogleSignIn: re-export useSignInWithGoogle
  ClerkGoogleSignIn-->>App: provide hook implementation
Loading

Possibly related issues

Suggested reviewers: mauricioabreu, dstaley

Poem

A rabbit hops with a package new,
Google Sign-In finds a home so true. 🐇
Out of @clerk/expo it did part,
Into its own module, a fresh start.
Hop, build, test — all rearranged,
One small warren, cleanly changed. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: moving Google Sign-In into a separate Expo package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

@vercel

vercel Bot commented Jun 30, 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 1, 2026 7:15pm
swingset Ready Ready Preview, Comment Jul 1, 2026 7:15pm

Request Review

@wobsoriano

Copy link
Copy Markdown
Member Author

!snapshot

@pkg-pr-new

pkg-pr-new Bot commented Jul 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0a9bd17

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-01T19:18:50.583Z

Summary

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

Warning
17 breaking change(s) detected - Major version bump required

🤖 This report was reviewed by claude-sonnet-4-6.

🔴 Breaking changes index (17)

Every breaking change, up front. Full diffs are in the package sections below.

Package Subpath Change
@clerk/expo ./google StartGoogleAuthenticationFlowParams
@clerk/expo ./google StartGoogleAuthenticationFlowReturnType
@clerk/expo ./google useSignInWithGoogle
@clerk/expo ./types CancelledResponse
@clerk/expo ./types ConfigureParams
@clerk/expo ./types CreateAccountParams
@clerk/expo ./types ExplicitSignInParams
@clerk/expo ./types GoogleSignInError
@clerk/expo ./types GoogleSignInError.code
@clerk/expo ./types GoogleSignInErrorCode
@clerk/expo ./types GoogleUser
@clerk/expo ./types NoSavedCredentialFound
@clerk/expo ./types OneTapResponse
@clerk/expo ./types OneTapSuccessResponse
@clerk/expo ./types SignInParams
@clerk/expo ./types StartGoogleAuthenticationFlowParams
@clerk/expo ./types StartGoogleAuthenticationFlowReturnType

@clerk/expo

Current version: 3.6.5
Recommended bump: MAJOR → 4.0.0

Subpath ./google

🔴 Breaking Changes (3)

Changed: StartGoogleAuthenticationFlowParams
- export type StartGoogleAuthenticationFlowParams = {
-     unsafeMetadata?: SignUpUnsafeMetadata;
- };

Static analyzer: Removed type alias StartGoogleAuthenticationFlowParams

🤖 AI review (confirmed) (97%): The exported type alias StartGoogleAuthenticationFlowParams was removed, breaking any consumer that referenced it explicitly.

Migration: Remove references to StartGoogleAuthenticationFlowParams or define a local equivalent type with { unsafeMetadata?: SignUpUnsafeMetadata }.

Changed: StartGoogleAuthenticationFlowReturnType
- export type StartGoogleAuthenticationFlowReturnType = {
-     createdSessionId: string | null;
-     setActive?: SetActive;
-     signIn?: SignInResource;
-     signUp?: SignUpResource;
- };

Static analyzer: Removed type alias StartGoogleAuthenticationFlowReturnType

🤖 AI review (confirmed) (97%): The exported type alias StartGoogleAuthenticationFlowReturnType was removed, breaking any consumer that referenced it explicitly.

Migration: Remove references to StartGoogleAuthenticationFlowReturnType or define a local equivalent type with { createdSessionId: string | null; setActive?: SetActive; signIn?: SignInResource; signUp?: SignUpResource }.

Changed: useSignInWithGoogle
- useSignInWithGoogle: () => {
-     startGoogleAuthenticationFlow: (startGoogleAuthenticationFlowParams?: import("./useSignInWithGoogle.types").StartGoogleAuthenticationFlowParams) => Promise<import("./useSignInWithGoogle.types").StartGoogleAuthenticationFlowReturnType>;
- }

Static analyzer: Removed function useSignInWithGoogle

🤖 AI review (confirmed) (99%): The exported hook useSignInWithGoogle was entirely removed, so any consumer calling it will fail to compile.

Migration: Remove all calls to useSignInWithGoogle and migrate to whatever replacement API the new version of @clerk/expo provides for Google sign-in.

Subpath ./types

🔴 Breaking Changes (14)

Changed: CancelledResponse
- export type CancelledResponse = {
-     type: 'cancelled';
-     data: null;
- };

Static analyzer: Removed type alias CancelledResponse

🤖 AI review (confirmed) (97%): The exported type alias CancelledResponse was removed; consumers referencing it will fail to compile.

Migration: Remove references to CancelledResponse or copy the type definition locally.

Changed: ConfigureParams
- export type ConfigureParams = {
-     webClientId: string;
-     iosClientId?: string;
-     hostedDomain?: string;
-     autoSelectEnabled?: boolean;
- };

Static analyzer: Removed type alias ConfigureParams

🤖 AI review (confirmed) (97%): The exported type alias ConfigureParams was removed; consumers using it as a type annotation or parameter type will fail to compile.

Migration: Remove references to ConfigureParams or copy the type definition locally.

Changed: CreateAccountParams
- export type CreateAccountParams = {
-     nonce?: string;
- };

Static analyzer: Removed type alias CreateAccountParams

🤖 AI review (confirmed) (97%): The exported type alias CreateAccountParams was removed; consumers referencing it will fail to compile.

Migration: Remove references to CreateAccountParams or copy the type definition locally.

Changed: ExplicitSignInParams
- export type ExplicitSignInParams = {
-     nonce?: string;
- };

Static analyzer: Removed type alias ExplicitSignInParams

🤖 AI review (confirmed) (97%): The exported type alias ExplicitSignInParams was removed; consumers referencing it will fail to compile.

Migration: Remove references to ExplicitSignInParams or copy the type definition locally.

Changed: GoogleSignInError
- export interface GoogleSignInError extends Error

Static analyzer: Removed interface GoogleSignInError

🤖 AI review (confirmed) (97%): The exported interface GoogleSignInError was removed; consumers catching or typing errors with it will fail to compile.

Migration: Remove references to GoogleSignInError or copy the interface definition locally.

Changed: GoogleSignInError.code
- code: GoogleSignInErrorCode;

Static analyzer: Removed property GoogleSignInError.code

🤖 AI review (confirmed) (97%): The code property on GoogleSignInError is removed along with the interface itself; code reading .code on caught errors will lose type safety or fail to compile.

Migration: Remove references to GoogleSignInError.code or copy the interface and property definition locally.

Changed: GoogleSignInErrorCode
- export type GoogleSignInErrorCode = 'SIGN_IN_CANCELLED' | 'NO_SAVED_CREDENTIAL_FOUND' | 'NOT_CONFIGURED' | 'GOOGLE_SIGN_IN_ERROR' | 'E_ACTIVITY_UNAVAILABLE';

Static analyzer: Removed type alias GoogleSignInErrorCode

🤖 AI review (confirmed) (97%): The exported type alias GoogleSignInErrorCode was removed; consumers using it as a type annotation will fail to compile.

Migration: Remove references to GoogleSignInErrorCode or copy the union type definition locally.

Changed: GoogleUser
- export type GoogleUser = {
-     id: string;
-     email: string;
-     name: string | null;
-     givenName: string | null;
-     familyName: string | null;
-     photo: string | null;
- };

Static analyzer: Removed type alias GoogleUser

🤖 AI review (confirmed) (97%): The exported type alias GoogleUser was removed; consumers referencing it will fail to compile.

Migration: Remove references to GoogleUser or copy the type definition locally.

Changed: NoSavedCredentialFound
- export type NoSavedCredentialFound = {
-     type: 'noSavedCredentialFound';
-     data: null;
- };

Static analyzer: Removed type alias NoSavedCredentialFound

🤖 AI review (confirmed) (97%): The exported type alias NoSavedCredentialFound was removed; consumers referencing it will fail to compile.

Migration: Remove references to NoSavedCredentialFound or copy the type definition locally.

Changed: OneTapResponse
- export type OneTapResponse = OneTapSuccessResponse | CancelledResponse | NoSavedCredentialFound;

Static analyzer: Removed type alias OneTapResponse

🤖 AI review (confirmed) (97%): The exported type alias OneTapResponse was removed; consumers using it as a return or parameter type will fail to compile.

Migration: Remove references to OneTapResponse or copy the union type definition locally.

Changed: OneTapSuccessResponse
- export type OneTapSuccessResponse = {
-     type: 'success';
-     data: {
-         idToken: string;
-         user: GoogleUser;
-     };
- };

Static analyzer: Removed type alias OneTapSuccessResponse

🤖 AI review (confirmed) (97%): The exported type alias OneTapSuccessResponse was removed; consumers referencing it will fail to compile.

Migration: Remove references to OneTapSuccessResponse or copy the type definition locally.

Changed: SignInParams
- export type SignInParams = {
-     nonce?: string;
-     filterByAuthorizedAccounts?: boolean;
-     hint?: string;
- };

Static analyzer: Removed type alias SignInParams

🤖 AI review (confirmed) (97%): The exported type alias SignInParams was removed; consumers using it as a type annotation will fail to compile.

Migration: Remove references to SignInParams or copy the type definition locally.

Changed: StartGoogleAuthenticationFlowParams
- export type StartGoogleAuthenticationFlowParams = {
-     unsafeMetadata?: SignUpUnsafeMetadata;
- };

Static analyzer: Removed type alias StartGoogleAuthenticationFlowParams

🤖 AI review (confirmed) (97%): The exported type alias StartGoogleAuthenticationFlowParams was removed; consumers referencing it will fail to compile.

Migration: Remove references to StartGoogleAuthenticationFlowParams or copy the type definition locally.

Changed: StartGoogleAuthenticationFlowReturnType
- export type StartGoogleAuthenticationFlowReturnType = {
-     createdSessionId: string | null;
-     setActive?: SetActive;
-     signIn?: SignInResource;
-     signUp?: SignUpResource;
- };

Static analyzer: Removed type alias StartGoogleAuthenticationFlowReturnType

🤖 AI review (confirmed) (97%): The exported type alias StartGoogleAuthenticationFlowReturnType was removed; consumers referencing it will fail to compile.

Migration: Remove references to StartGoogleAuthenticationFlowReturnType or copy the type definition locally.


Report generated by Break Check

Last ran on 01dae50.

@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: 2

🧹 Nitpick comments (4)
packages/expo-google-signin/app.plugin.d.ts (1)

3-5: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider a JSDoc comment for this public config-plugin export.

withClerkExpoGoogleSignIn is the public entrypoint developers reference in their app.json/app.config.js plugins array. Since Clerk Docs generates reference pages from JSDoc in packages/**, a short JSDoc block describing usage/behavior (e.g., that it wires the iOS URL scheme) would help keep generated docs accurate if this symbol is surfaced.

As per path instructions, "Pay special attention to changes that add, remove, or modify JSDoc comments on public APIs... that may appear in generated reference docs."

🤖 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-google-signin/app.plugin.d.ts` around lines 3 - 5, Add a short
JSDoc block to the public config-plugin export in withClerkExpoGoogleSignIn so
generated reference docs have usage/behavior context. Update the declaration
around the withClerkExpoGoogleSignIn symbol to describe what the plugin does
(for example, wiring the iOS URL scheme) and keep the export signature
unchanged.

Source: Path instructions

packages/expo-google-signin/app.plugin.js (1)

9-11: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Silent no-op when the iOS URL scheme env var is missing.

If EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME isn't set, the plugin silently returns the config unmodified. For apps intending to use native Google Sign-In on iOS, this fails silently at build time rather than surfacing an actionable error, making the eventual runtime sign-in failure harder to diagnose.

As per coding guidelines, "Provide meaningful error messages to developers" and "Include error recovery suggestions where applicable."

💡 Proposed fix to warn when the scheme is missing
   if (!iosUrlScheme) {
+    console.warn(
+      '[`@clerk/expo-google-signin`] EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME is not set. ' +
+        'Native Google Sign-In will not work on iOS until this is configured.',
+    );
     return config;
   }
🤖 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-google-signin/app.plugin.js` around lines 9 - 11, The iOS URL
scheme check in the plugin currently returns the config unchanged when
EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME is missing, which hides a
misconfiguration. Update the app.plugin.js logic around the iosUrlScheme guard
to surface an actionable build-time error or warning with a clear message and
recovery hint instead of silently no-oping, so developers can fix the missing
native Google Sign-In setup before runtime. Reference the existing plugin flow
and the iosUrlScheme handling to keep the behavior explicit and easy to locate.

Source: Coding guidelines

packages/expo-google-signin/vitest.setup.mts (1)

18-18: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Empty beforeAll is a no-op.

beforeAll(() => {}); does nothing; can be removed unless intended as a placeholder for future setup.

🧹 Proposed removal
-
-beforeAll(() => {});
🤖 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-google-signin/vitest.setup.mts` at line 18, The empty beforeAll
in vitest.setup.mts is a no-op and should be removed. Delete the beforeAll(() =>
{}) call unless you plan to add real setup logic there later, keeping the file
clean and avoiding unnecessary test hooks.
packages/expo-google-signin/src/useSignInWithGoogle.ts (1)

24-25: 📐 Maintainability & Code Quality | 🔵 Trivial

Docs-team review may be needed for the removed migration note.

This public JSDoc paragraph was deleted, so please confirm the generated reference still points users to the standalone package/plugin migration steps somewhere else. As per path instructions, public/reference-facing JSDoc changes should be checked for generated docs drift.

🤖 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-google-signin/src/useSignInWithGoogle.ts` around lines 24 - 25,
The public JSDoc in useSignInWithGoogle was shortened by removing a migration
note, so verify that the standalone package/plugin migration guidance is still
available in the generated reference. Update the surrounding docs comment in
useSignInWithGoogle (and any related public docs entry points) so users are
still directed to the correct migration steps, or restore an equivalent
reference elsewhere in the reference-facing JSDoc.

Source: Path instructions

🤖 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-google-signin/package.json`:
- Around line 51-63: The devDependency versions in the package.json for
expo-google-signin are misaligned with the Expo SDK being targeted, specifically
the react-native version is too new for SDK 54. Update the expo-related
devDependencies in this package to match the Expo 54-compatible versions, and
keep the peerDependencies range broad enough to support the intended SDKs; use
the existing package.json dependency block and peerDependencies block as the
place to align the versions.

In `@packages/expo-google-signin/src/useSignInWithGoogle.types.ts`:
- Around line 3-7: The StartGoogleAuthenticationFlowParams type currently
redeclares SignUpUnsafeMetadata as a plain Record, which bypasses the shared
ambient contract and any app-specific augmentation. Update
useSignInWithGoogle.types so StartGoogleAuthenticationFlowParams references the
shared SignUpUnsafeMetadata symbol directly instead of defining a local alias,
keeping the unsafeMetadata field aligned with the common contract.

---

Nitpick comments:
In `@packages/expo-google-signin/app.plugin.d.ts`:
- Around line 3-5: Add a short JSDoc block to the public config-plugin export in
withClerkExpoGoogleSignIn so generated reference docs have usage/behavior
context. Update the declaration around the withClerkExpoGoogleSignIn symbol to
describe what the plugin does (for example, wiring the iOS URL scheme) and keep
the export signature unchanged.

In `@packages/expo-google-signin/app.plugin.js`:
- Around line 9-11: The iOS URL scheme check in the plugin currently returns the
config unchanged when EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME is missing, which
hides a misconfiguration. Update the app.plugin.js logic around the iosUrlScheme
guard to surface an actionable build-time error or warning with a clear message
and recovery hint instead of silently no-oping, so developers can fix the
missing native Google Sign-In setup before runtime. Reference the existing
plugin flow and the iosUrlScheme handling to keep the behavior explicit and easy
to locate.

In `@packages/expo-google-signin/src/useSignInWithGoogle.ts`:
- Around line 24-25: The public JSDoc in useSignInWithGoogle was shortened by
removing a migration note, so verify that the standalone package/plugin
migration guidance is still available in the generated reference. Update the
surrounding docs comment in useSignInWithGoogle (and any related public docs
entry points) so users are still directed to the correct migration steps, or
restore an equivalent reference elsewhere in the reference-facing JSDoc.

In `@packages/expo-google-signin/vitest.setup.mts`:
- Line 18: The empty beforeAll in vitest.setup.mts is a no-op and should be
removed. Delete the beforeAll(() => {}) call unless you plan to add real setup
logic there later, keeping the file clean and avoiding unnecessary test hooks.
🪄 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: 2eb2524a-7c13-4f0f-9303-ae45c2177857

📥 Commits

Reviewing files that changed from the base of the PR and between c01b937 and e51652a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (35)
  • .changeset/expo-google-signin-package.md
  • packages/expo-google-signin/android/build.gradle
  • packages/expo-google-signin/android/src/main/AndroidManifest.xml
  • packages/expo-google-signin/android/src/main/java/expo/modules/clerk/googlesignin/ClerkGoogleSignInModule.kt
  • packages/expo-google-signin/app.plugin.d.ts
  • packages/expo-google-signin/app.plugin.js
  • packages/expo-google-signin/expo-module.config.json
  • packages/expo-google-signin/ios/ClerkGoogleSignIn.podspec
  • packages/expo-google-signin/ios/ClerkGoogleSignInModule.swift
  • packages/expo-google-signin/package.json
  • packages/expo-google-signin/src/__tests__/useSignInWithGoogle.test.ts
  • packages/expo-google-signin/src/global.d.ts
  • packages/expo-google-signin/src/google-one-tap/ClerkGoogleOneTapSignIn.ts
  • packages/expo-google-signin/src/google-one-tap/index.ts
  • packages/expo-google-signin/src/google-one-tap/types.ts
  • packages/expo-google-signin/src/index.ts
  • packages/expo-google-signin/src/specs/NativeClerkGoogleSignIn.android.ts
  • packages/expo-google-signin/src/specs/NativeClerkGoogleSignIn.ts
  • packages/expo-google-signin/src/useSignInWithGoogle.android.ts
  • packages/expo-google-signin/src/useSignInWithGoogle.ios.ts
  • packages/expo-google-signin/src/useSignInWithGoogle.shared.ts
  • packages/expo-google-signin/src/useSignInWithGoogle.ts
  • packages/expo-google-signin/src/useSignInWithGoogle.types.ts
  • packages/expo-google-signin/tsconfig.declarations.json
  • packages/expo-google-signin/tsconfig.json
  • packages/expo-google-signin/tsup.config.ts
  • packages/expo-google-signin/vitest.config.mts
  • packages/expo-google-signin/vitest.setup.mts
  • packages/expo/android/build.gradle
  • packages/expo/app.plugin.js
  • packages/expo/expo-module.config.json
  • packages/expo/package.json
  • packages/expo/src/google/index.ts
  • packages/expo/src/plugin/withClerkExpo.ts
  • packages/expo/src/types/index.ts
💤 Files with no reviewable changes (3)
  • packages/expo/android/build.gradle
  • packages/expo/src/types/index.ts
  • packages/expo/app.plugin.js

Comment on lines +51 to +63
"expo": "~54.0.34",
"expo-constants": "^18.0.13",
"expo-crypto": "^15.0.9",
"react": "catalog:react",
"react-native": "^0.85.2",
"tsup": "catalog:repo"
},
"peerDependencies": {
"expo": ">=53 <57",
"expo-constants": ">=12",
"expo-crypto": ">=12",
"react": "^18.0.0 || ^19.0.0",
"react-native": ">=0.75"

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Which React Native version does Expo SDK 54 require, and is react-native 0.85 compatible with expo 54?

💡 Result:

Expo SDK 54 requires React Native 0.81 [1][2]. It is not compatible with React Native 0.85 [3][4]. Each version of Expo SDK is designed to work with a specific React Native version, and using mismatched versions is generally not supported [3]. React Native 0.85 was introduced as the target version for Expo SDK 56 [3][4].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the package manifest and nearby workspace context.
sed -n '1,220p' packages/expo-google-signin/package.json
printf '\n---\n'
git ls-files 'packages/expo-google-signin/*' | sed -n '1,120p'

Repository: clerk/javascript

Length of output: 3499


Align the Expo devDependency versions. Expo SDK 54 ships with React Native 0.81, so react-native@^0.85.2 is out of sync here and can break local installs or builds for this package.

🤖 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-google-signin/package.json` around lines 51 - 63, The
devDependency versions in the package.json for expo-google-signin are misaligned
with the Expo SDK being targeted, specifically the react-native version is too
new for SDK 54. Update the expo-related devDependencies in this package to match
the Expo 54-compatible versions, and keep the peerDependencies range broad
enough to support the intended SDKs; use the existing package.json dependency
block and peerDependencies block as the place to align the versions.

Comment on lines +3 to 7
type SignUpUnsafeMetadata = Record<string, unknown>;

export type StartGoogleAuthenticationFlowParams = {
unsafeMetadata?: SignUpUnsafeMetadata;
};

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Reuse the shared SignUpUnsafeMetadata contract.

Record<string, unknown> freezes this field to a plain record and drops any app-specific augmentation on the shared SignUpUnsafeMetadata interface. Please reference the ambient shared type here instead of redefining it locally.

🤖 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-google-signin/src/useSignInWithGoogle.types.ts` around lines 3
- 7, The StartGoogleAuthenticationFlowParams type currently redeclares
SignUpUnsafeMetadata as a plain Record, which bypasses the shared ambient
contract and any app-specific augmentation. Update useSignInWithGoogle.types so
StartGoogleAuthenticationFlowParams references the shared SignUpUnsafeMetadata
symbol directly instead of defining a local alias, keeping the unsafeMetadata
field aligned with the common contract.

@@ -0,0 +1,73 @@
{
"name": "@clerk/expo-google-signin",

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.

Should we do anything for the first-publish path here, or is the plan to force this check once and publish immediately after merge?

pkg-pr-new --compact --pnpm ./packages/* is failing because @clerk/expo-google-signin does not exist on npm yet. If this might sit on main before the first publish, should we exclude it from compact previews or make that workflow tolerate brand-new packages?

@@ -0,0 +1,8 @@
---
'@clerk/expo': major
'@clerk/expo-google-signin': minor

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.

Should we add @clerk/expo-google-signin to the API Changes/break-check coverage too? @clerk/expo and @clerk/expo-passkeys are already tracked there, so it seems like this new public package should get the same declaration snapshot coverage.

@@ -0,0 +1,9 @@
{
"platforms": ["apple", "android"],

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.

Should the Expo native matrix exercise this package as part of the split? The current workflow still only triggers on packages/expo/** and only packs/installs @clerk/expo, so it proves the main package still prebuilds but not that the new native Google Sign-In package works in a clean app.

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.

2 participants