feat(expo): add iOS Google sign-in hint#8906
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 9474fb3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
📝 WalkthroughWalkthroughAdds an optional ChangesiOS hint support and platform-specific docs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1f98539 to
9c6fe1c
Compare
9c6fe1c to
9474fb3
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9474fb3c67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let hint: String? = filterByAuthorized | ||
| ? GIDSignIn.sharedInstance.currentUser?.profile?.email | ||
| : nil | ||
| let hint = params?["hint"] as? String |
There was a problem hiding this comment.
Preserve the iOS filter hint fallback
For iOS callers that already pass filterByAuthorizedAccounts: true, this patch release now drops the only behavior that flag had: the previous code used the current Google user's email as the hint. Those callers will silently stop getting the returning-account hint unless they also adopt the new hint option, which changes behavior for existing consumers of the public signIn params. Please keep the new explicit hint but fall back to the old filterByAuthorizedAccounts-based hint when no explicit hint is provided.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
See the backward compatability section of the PR body
API Changes Report
Summary
@clerk/expoCurrent version: 3.4.4 Subpath
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/src/google-one-tap/ClerkGoogleOneTapSignIn.ts`:
- Around line 88-89: The JSDoc for the hint parameter in
ClerkGoogleOneTapSignIn.ts is incomplete and lacks the helpful detail provided
in the corresponding type definition in types.ts. Enhance the JSDoc for the hint
parameter to include comprehensive documentation that explains what values it
accepts (user ID or email address), how it behaves (may prefill or prioritize an
account), and clarify that it does not restrict the account picker. Reference
the detailed documentation in types.ts (lines 54-60) as a guide to match the
level of detail and customer-facing clarity needed for the generated Clerk Docs.
🪄 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
Run ID: ca9aec07-e321-405e-925d-a115fcd0a609
📒 Files selected for processing (4)
.changeset/bright-google-docs.mdpackages/expo/ios/ClerkGoogleSignInModule.swiftpackages/expo/src/google-one-tap/ClerkGoogleOneTapSignIn.tspackages/expo/src/google-one-tap/types.ts
Summary
Adds an iOS-only
hintoption for Google Sign-In and documentsfilterByAuthorizedAccountsas Android-only.Reasoning
Google does not document these as one shared cross-platform option. The Android Credential Manager API exposes
setFilterByAuthorizedAccounts(boolean)onGetGoogleIdOption.Builder, where it controls whether the account picker is limited to accounts already authorized for the app. The iOS Google Sign-In API exposeshintonGIDSignIn.signIn(...), where it can prefill or prioritize a user ID or email address but does not strictly filter the account picker.This keeps the Expo API usable from one shared call site: apps can pass both options, Android consumes
filterByAuthorizedAccountsand ignoreshint, and iOS consumeshintand ignoresfilterByAuthorizedAccounts.Backward compatibility
This is additive for JavaScript callers: existing
signIncalls continue to work, and Android keeps the existingfilterByAuthorizedAccountsbehavior and default. On iOS,filterByAuthorizedAccountsis now treated as an Android-only option. A previous implementation briefly mapped that option to an implicit restored-user email hint on iOS, but that did not match Google’s platform APIs becausehintdoes not strictly filter the account picker. Use the newhintoption when an iOS sign-in hint is desired.