Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-google-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/expo': patch
---

Adds an iOS Google sign-in `hint` option and clarifies that Android account filtering is platform-specific.
5 changes: 1 addition & 4 deletions packages/expo/ios/ClerkGoogleSignInModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ public class ClerkGoogleSignInModule: Module {
return
}

let filterByAuthorized = params?["filterByAuthorizedAccounts"] as? Bool ?? false
let hint: String? = filterByAuthorized
? GIDSignIn.sharedInstance.currentUser?.profile?.email
: nil
let hint = params?["hint"] as? String

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@mikepitre mikepitre Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the backward compatability section of the PR body

let nonce = params?["nonce"] as? String

GIDSignIn.sharedInstance.signIn(
Expand Down
3 changes: 2 additions & 1 deletion packages/expo/src/google-one-tap/ClerkGoogleOneTapSignIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export const ClerkGoogleOneTapSignIn = {
*
* @param params - Sign-in parameters
* @param params.nonce - Cryptographic nonce for replay protection
* @param params.filterByAuthorizedAccounts - Only show previously authorized accounts (default: true)
* @param params.filterByAuthorizedAccounts - Android only. Filter to previously authorized accounts.
* @param params.hint - iOS only. Hint for Google Sign-In.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
*
* @returns Promise resolving to OneTapResponse
*/
Expand Down
21 changes: 19 additions & 2 deletions packages/expo/src/google-one-tap/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,28 @@ export type SignInParams = {
nonce?: string;

/**
* Whether to filter credentials to only show accounts that have been
* previously authorized for this app.
* Android only. Whether to filter credentials to only show accounts that have
* previously authorized this app.
*
* No-op on iOS.
*
* @platform Android
* @default true
*/
filterByAuthorizedAccounts?: boolean;

/**
* iOS only. Hint passed to Google Sign-In, such as a user ID or email
* address.
*
* This may prefill or prioritize an account when possible, but does not
* restrict the account picker.
*
* No-op on Android.
*
* @platform iOS
*/
hint?: string;
};

/**
Expand Down
Loading