Skip to content

Commit 23fc78a

Browse files
committed
Remove pointless checks
Signed-off-by: Alex Saveau <[email protected]>
1 parent 11f49ac commit 23fc78a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,6 @@ public Task<AuthResult> silentSignIn(@NonNull Context context,
282282
if (mAuth.getCurrentUser() != null) {
283283
throw new IllegalArgumentException("User already signed in!");
284284
}
285-
if (desiredConfigs.isEmpty()) {
286-
throw new IllegalArgumentException("At least one provider must be specified.");
287-
}
288285

289286
List<IdpConfig> configs = new ArrayList<>();
290287
for (IdpConfig config : desiredConfigs) {
@@ -296,7 +293,8 @@ public Task<AuthResult> silentSignIn(@NonNull Context context,
296293
}
297294

298295
if (configs.isEmpty()) {
299-
throw new IllegalArgumentException("No supported providers were supplied.");
296+
throw new IllegalArgumentException("No supported providers were supplied. " +
297+
"Add either Google or email support.");
300298
}
301299

302300
final Context appContext = context.getApplicationContext();

0 commit comments

Comments
 (0)