Skip to content

Commit 93c3419

Browse files
SUPERCILEXsamtstern
authored andcommitted
Fix oversight introduced in 7ca3cbf (#1019)
1 parent f25a5bd commit 93c3419

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,20 @@ public Task<Void> then(@NonNull Task<Void> task) {
281281
private Task<Void> signOutIdps(@NonNull Context context) {
282282
try {
283283
LoginManager.getInstance().logOut();
284-
TwitterProvider.signOut(context);
285284
} catch (NoClassDefFoundError e) {
286285
// Do nothing: this is perfectly fine if the dev doesn't include Facebook/Twitter
287286
// support
288287
}
289288

289+
try {
290+
TwitterProvider.signOut(context);
291+
} catch (NoClassDefFoundError e) {
292+
// See comment above
293+
// Note: we need to have speperate try/catch statements since devs can include
294+
// _either_ one of the providers. If one crashes, we still need to sign out of
295+
// the other one.
296+
}
297+
290298
return GoogleSignIn.getClient(context, GoogleSignInOptions.DEFAULT_SIGN_IN).signOut();
291299
}
292300

0 commit comments

Comments
 (0)