@Test public void reAuthenticateError() { TestObserver<Void> userTestObserver = RxFirebaseUser.reAuthenticate(firebaseUser, authCredential).test(); testOnFailureListener.getValue().onFailure(EXCEPTION); verify(firebaseUser).reauthenticate(authCredential); userTestObserver.assertError(EXCEPTION) .dispose(); }
@NonNull public static Completable reAuthenticate(@NonNull final FirebaseUser firebaseUser, @NonNull final AuthCredential credential) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) throws Exception { RxCompletableHandler.assignOnTask(emitter, firebaseUser.reauthenticate(credential)); } }); }
RxFirebaseUser { @NonNull public static Completable reAuthenticate(@NonNull final FirebaseUser firebaseUser, @NonNull final AuthCredential credential) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) throws Exception { RxCompletableHandler.assignOnTask(emitter, firebaseUser.reauthenticate(credential)); } }); } }
RxFirebaseUser { @NonNull public static Completable reAuthenticate(@NonNull final FirebaseUser firebaseUser, @NonNull final AuthCredential credential) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) throws Exception { RxCompletableHandler.assignOnTask(emitter, firebaseUser.reauthenticate(credential)); } }); }  }
RxFirebaseUser { @NonNull public static Completable reAuthenticate(@NonNull final FirebaseUser firebaseUser, @NonNull final AuthCredential credential) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) throws Exception { RxCompletableHandler.assignOnTask(emitter, firebaseUser.reauthenticate(credential)); } }); }  @NonNull static Maybe<GetTokenResult> getIdToken(@NonNull final FirebaseUser firebaseUser,
                                                   final boolean forceRefresh); @NonNull static Completable updateEmail(@NonNull final FirebaseUser firebaseUser,
                                          @NonNull final String email); @NonNull static Completable updatePassword(@NonNull final FirebaseUser firebaseUser,
                                             @NonNull final String password); @NonNull static Completable updateProfile(@NonNull final FirebaseUser firebaseUser,
                                            @NonNull final UserProfileChangeRequest request); @NonNull static Completable delete(@NonNull final FirebaseUser firebaseUser); @NonNull static Completable reAuthenticate(@NonNull final FirebaseUser firebaseUser,
                                             @NonNull final AuthCredential credential); @NonNull static Completable reload(@NonNull final FirebaseUser firebaseUser); @NonNull static Completable sendEmailVerification(@NonNull final FirebaseUser firebaseUser); @NonNull static Maybe<AuthResult> linkWithCredential(@NonNull final FirebaseUser firebaseUser,
                                                       @NonNull final AuthCredential credential); @NonNull static Maybe<AuthResult> unlink(@NonNull final FirebaseUser firebaseUser,
                                           @NonNull final String provider); @NonNull static Completable updatePhoneNumber(@NonNull final FirebaseUser firebaseUser,
                                                @NonNull final PhoneAuthCredential phoneAuthCredential); @NonNull static Maybe<AuthResult> reauthenticateAndRetrieveData(@NonNull final FirebaseUser firebaseUser,
                                                                  @NonNull final AuthCredential credential); }
RxFirebaseUser { @NonNull public static Completable reAuthenticate(@NonNull final FirebaseUser firebaseUser, @NonNull final AuthCredential credential) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) throws Exception { RxCompletableHandler.assignOnTask(emitter, firebaseUser.reauthenticate(credential)); } }); }  @NonNull static Maybe<GetTokenResult> getIdToken(@NonNull final FirebaseUser firebaseUser,
                                                   final boolean forceRefresh); @NonNull static Completable updateEmail(@NonNull final FirebaseUser firebaseUser,
                                          @NonNull final String email); @NonNull static Completable updatePassword(@NonNull final FirebaseUser firebaseUser,
                                             @NonNull final String password); @NonNull static Completable updateProfile(@NonNull final FirebaseUser firebaseUser,
                                            @NonNull final UserProfileChangeRequest request); @NonNull static Completable delete(@NonNull final FirebaseUser firebaseUser); @NonNull static Completable reAuthenticate(@NonNull final FirebaseUser firebaseUser,
                                             @NonNull final AuthCredential credential); @NonNull static Completable reload(@NonNull final FirebaseUser firebaseUser); @NonNull static Completable sendEmailVerification(@NonNull final FirebaseUser firebaseUser); @NonNull static Maybe<AuthResult> linkWithCredential(@NonNull final FirebaseUser firebaseUser,
                                                       @NonNull final AuthCredential credential); @NonNull static Maybe<AuthResult> unlink(@NonNull final FirebaseUser firebaseUser,
                                           @NonNull final String provider); @NonNull static Completable updatePhoneNumber(@NonNull final FirebaseUser firebaseUser,
                                                @NonNull final PhoneAuthCredential phoneAuthCredential); @NonNull static Maybe<AuthResult> reauthenticateAndRetrieveData(@NonNull final FirebaseUser firebaseUser,
                                                                  @NonNull final AuthCredential credential);  }