Skip to content

Commit 11f49ac

Browse files
committed
Add clarifying comment
Signed-off-by: Alex Saveau <[email protected]>
1 parent bcb873b commit 11f49ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

auth/src/main/java/com/firebase/ui/auth/AuthUI.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ public Task<AuthResult> silentSignIn(@NonNull Context context,
320320
final GoogleSignInOptions finalGoogleOptions = googleOptions;
321321
return GoogleApiUtils.getCredentialsClient(context)
322322
.request(new CredentialRequest.Builder()
323+
// We can support both email and Google at the same time here because they
324+
// are mutually exclusive. If a user signs in with Google, their email
325+
// account will automatically be upgraded (a.k.a. replaced) with the Google
326+
// one, meaning Smart Lock won't have to show the picker UI.
323327
.setPasswordLoginSupported(email != null)
324328
.setAccountTypes(google == null ? null :
325329
ProviderUtils.providerIdToAccountType(GoogleAuthProvider.PROVIDER_ID))

0 commit comments

Comments
 (0)