fix(expo): surface android google sign-in provider failures - #9464
fix(expo): surface android google sign-in provider failures#9464wobsoriano wants to merge 2 commits into
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 4d525fb The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: 9 reviews are currently available. Based on recent review activity, included reviews refill at 10 per hour. 📝 WalkthroughWalkthroughAndroid 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 Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to 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
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Comment |
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
Description
Built on top of #9462. Opened from a branch so the Expo native build and E2E jobs runs.
Fixes #9461.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change