Skip to content

Commit

Permalink
Merge remote-tracking branch 'GitLiveApp/master' into gitlive/kotlin-…
Browse files Browse the repository at this point in the history
…1.8.21-gradle-8
  • Loading branch information
Daeda88 committed Sep 26, 2023
2 parents 1894f16 + 36735fb commit 7071613
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ import cocoapods.FirebaseAuth.*
import dev.gitlive.firebase.Firebase
import dev.gitlive.firebase.FirebaseApp
import dev.gitlive.firebase.FirebaseException
import dev.gitlive.firebase.FirebaseNetworkException
import dev.gitlive.firebase.auth.ActionCodeResult.*
import kotlinx.cinterop.*
import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.callbackFlow
import platform.Foundation.*
import platform.Foundation.NSError
import platform.Foundation.NSURL


actual val Firebase.auth
Expand Down Expand Up @@ -209,6 +211,8 @@ private fun NSError.toException() = when(domain) {
FIRAuthErrorCodeWebContextCancelled,
FIRAuthErrorCodeWebInternalError -> FirebaseAuthWebException(toString())

FIRAuthErrorCodeNetworkError -> FirebaseNetworkException(toString())

else -> FirebaseAuthException(toString())
}
else -> FirebaseAuthException(toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ private fun errorToException(cause: dynamic) = when(val code = cause.code?.toStr
"auth/user-token-expired" -> FirebaseAuthInvalidUserException(code, cause)
"auth/web-storage-unsupported" -> FirebaseAuthWebException(code, cause)
"auth/network-request-failed" -> FirebaseNetworkException(code, cause)
"auth/timeout" -> FirebaseNetworkException(code, cause)
"auth/weak-password" -> FirebaseAuthWeakPasswordException(code, cause)
"auth/invalid-credential",
"auth/invalid-verification-code",
Expand All @@ -176,7 +177,6 @@ private fun errorToException(cause: dynamic) = when(val code = cause.code?.toStr
"auth/credential-already-in-use" -> FirebaseAuthUserCollisionException(code, cause)
"auth/email-already-in-use" -> FirebaseAuthUserCollisionException(code, cause)
"auth/invalid-email" -> FirebaseAuthEmailException(code, cause)

// "auth/app-deleted" ->
// "auth/app-not-authorized" ->
// "auth/argument-error" ->
Expand Down
22 changes: 11 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ firebase-perf.skipJsTests=false
firebase-storage.skipJsTests=false

# Versions:
firebase-app.version=1.10.0
firebase-auth.version=1.10.0
firebase-common.version=1.10.0
firebase-config.version=1.10.0
firebase-database.version=1.10.0
firebase-firestore.version=1.10.0
firebase-functions.version=1.10.0
firebase-installations.version=1.10.0
firebase-perf.version=1.10.0
firebase-crashlytics.version=1.10.0
firebase-storage.version=1.10.0
firebase-app.version=1.10.1
firebase-auth.version=1.10.1
firebase-common.version=1.10.1
firebase-config.version=1.10.1
firebase-database.version=1.10.1
firebase-firestore.version=1.10.1
firebase-functions.version=1.10.1
firebase-installations.version=1.10.1
firebase-perf.version=1.10.1
firebase-crashlytics.version=1.10.1
firebase-storage.version=1.10.1

# Dependencies Versions:
gradlePluginVersion=8.1.1
Expand Down

0 comments on commit 7071613

Please sign in to comment.