- update FirebaseTest.kt local host

Took 9 minutes
This commit is contained in:
2023-03-15 22:04:40 +00:00
parent 2a3b2cac10
commit 641ad859d8
2 changed files with 9 additions and 5 deletions

View File

@@ -61,11 +61,16 @@ open class FirebaseTest<T : BaseActivity<*>>(
// remove the user we created for testing
suspend fun removeUser() {
getEmail()?.let {
if (firebaseAuthSource.getUser() == null) firebaseAuthSource.signIn(email = it, password = USER_PASSWORD).await()
firebaseAuthSource.reauthenticate(it, USER_PASSWORD).await()
firebaseAuthSource.deleteProfile().await()
try {
getEmail()?.let {
if (firebaseAuthSource.getUser() == null) firebaseAuthSource.signIn(email = it, password = USER_PASSWORD).await()
firebaseAuthSource.reauthenticate(it, USER_PASSWORD).await()
firebaseAuthSource.deleteProfile().await()
}
} catch (e: Exception) {
e.printStackTrace()
}
}
fun generateEmailAddress(): String {