capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.
https://capawesome.io/plugins/firebase/
Apache License 2.0
405 stars 102 forks source link

feat: Authentication error codes #697

Closed emmernme closed 3 months ago

emmernme commented 3 months ago

Plugin(s)

Current problem

Firebase Authentication's native implementation has typings for error messages, returning both an error code and a descriptive message. In order to handle errors effectively, it would be useful for these errors to also be provided in this plugin. E.g. FirebaseAuthentication.signInWithEmailAndPassword, it would be useful to be able to differentiate between invalid credentials and other errors such as "user deleted", etc.

See all available error codes & messages here: https://firebase.google.com/docs/reference/js/auth#autherrorcodes

Preferred solution

Pass on types and error objects in the same format as the Firebase auth library.

Alternative options

No response

Additional context

No response

Before submitting

emmernme commented 3 months ago

I see now that the full error objects are already included, which is great! Closing as completed.