firebase-kotlin-sdk
firebase-kotlin-sdk copied to clipboard
Handle `FirebaseAuthWeakPasswordException` subclass of `FirebaseAuthInvalidCredentialsException`
trafficstars
In the Android SDK, FirebaseAuthWeakPasswordException extends FirebaseAuthInvalidCredentialsException (see https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseAuthWeakPasswordException).
The corresponding error code is auth/weak-password -- see the corresponding code in the JS SDK: https://github.com/firebase/firebase-js-sdk/blob/69ff8eb549e49de51cae11a04bce023bb6e1fc02/packages/auth/src/core/errors.ts#L551.
The current code mapping (https://github.com/GitLiveApp/firebase-kotlin-sdk/blob/master/firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt#L157) will handle this relatively important case as a generic error.