Skip to content

fix(expo): surface android google sign-in provider failures - #9464

Open
wobsoriano wants to merge 2 commits into
mainfrom
rob/expo-google-signin-error-classification
Open

fix(expo): surface android google sign-in provider failures#9464
wobsoriano wants to merge 2 commits into
mainfrom
rob/expo-google-signin-error-classification

Conversation

@wobsoriano

@wobsoriano wobsoriano commented Aug 16, 2026

Copy link
Copy Markdown
Member

Description

Built on top of #9462. Opened from a branch so the Expo native build and E2E jobs runs.

Fixes #9461.

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:

wobsoriano and others added 2 commits August 16, 2026 15:01
Android Credential Manager providers can return non-user failures through
GetCredentialCancellationException. The native module currently reports every
instance as SIGN_IN_CANCELLED, causing @clerk/expo to treat those failures as an
ordinary chooser dismissal and return no session or error.

This change keeps explicit Cancelled by user and Canceled by user responses as
SIGN_IN_CANCELLED and reports other messages as GOOGLE_SIGN_IN_ERROR. The same
classification is used by signIn, createAccount, and presentExplicitSignIn.

Co-authored-by: Eliot Gevers <84166025+eliotgevers@users.noreply.github.com>
Moves the cancellation-vs-failure decision out of Kotlin and into @clerk/expo.

The native module now passes the underlying Credential Manager message through
on SIGN_IN_CANCELLED instead of discarding it, and ClerkGoogleOneTapSignIn
decides whether it describes a dismissed chooser or a provider failure. Only
Google Play services prefixes its messages with a status code, so the check
defaults to a cancellation and only escalates on a prefixed message that does
not say "cancelled by user". androidx's own dismissal messages carry no prefix,
so back-press and selector dismissals stay silent.

Keeping the heuristic in JS means it runs under vitest in CI, where the Kotlin
one could not, and it can be corrected in a normal @clerk/expo release rather
than a native rebuild. Both version-skew combinations degrade to today's
behaviour rather than regressing.
@vercel

vercel Bot commented Aug 16, 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 Aug 16, 2026 10:09pm
swingset Ready Ready Preview Aug 16, 2026 10:09pm

Request Review

@changeset-bot

changeset-bot Bot commented Aug 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4d525fb

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 Minor
@clerk/expo-google-signin 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

@pkg-pr-new

pkg-pr-new Bot commented Aug 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9464

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 4d525fb

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: b17e8dcc-08b7-443a-859d-d8dad0faa9f2

📥 Commits

Reviewing files that changed from the base of the PR and between e4302b7 and 4d525fb.

📒 Files selected for processing (6)
  • .changeset/expo-google-provider-failures.md
  • .changeset/preserve-google-sign-in-errors.md
  • packages/expo-google-signin/android/src/main/java/expo/modules/clerk/googlesignin/ClerkGoogleSignInModule.kt
  • packages/expo/src/google-one-tap/ClerkGoogleOneTapSignIn.ts
  • packages/expo/src/google-one-tap/__tests__/ClerkGoogleOneTapSignIn.test.ts
  • packages/expo/src/google-one-tap/types.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/clerk-ios (auto-detected)
  • clerk/cli (auto-detected)
  • clerk/clerk-android (auto-detected)

Included review availability: 9 reviews are currently available. Based on recent review activity, included reviews refill at 10 per hour.


📝 Walkthrough

Walkthrough

Android Google Sign-In flows now preserve Credential Manager cancellation messages. Expo One Tap methods classify provider failures separately from genuine account chooser dismissal. Provider failures reject with GOOGLE_SIGN_IN_ERROR, while user cancellation returns the existing cancelled result. Tests cover sign-in, account creation, and explicit sign-in. Changesets document the updated behavior and package upgrade requirements.

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

Merge Risk: ⚪ Minimal · up to 4d525

This localized change surfaces Android Google sign-in provider failures without any identified merge-blocking risk; it is merge-ready after normal checks and review.

Possibly related issues

Possibly related PRs

  • clerk/javascript#9462 — Directly relates to extending Android cancellation classification through Expo One Tap flows.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description contains only the default template and checklist, so it does not provide meaningful details about the changes. Add a brief summary of the Android Google Sign-In error-handling changes and explain how to test them.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: surfacing Android Google Sign-In provider failures in Expo.
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.

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-08-16T22:09:56.393Z

Summary

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

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 4d525fb.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@clerk/expo-google-signin: Android provider failures are reported as user cancellation

1 participant