Closed ProjectINT closed 3 years ago
Ah I have the same issue
I want to take further steps after creating user and save additional profile data
But I can't signInWithEmailAndPassword(l.p).then((user) => { /save additional user data/ } )
and I'd also like to handle errors with .catch()
seanburlington, I fix it and send pull request, but at now I think to write own module because it's not one problem that I see in this package, you can look my pull request, I fix the problem then I use "npx patch-package ..." to use fixes.
This looks good to me, can we get it merged?
It's a little useless to have a login function where we can't access the errors. For now, my App has two logins, one I handle myself through my API, and one that uses this since I can't manage errors.
as @ProjectINT PR's got merged quite a while ago and this issue got stale, I assume this is fixed
Describe the bug
signInWithEmailAndPassword = (email: string, password: string) => { this.tryTo<firebase.auth.UserCredential>(() => firebaseAppAuth.signInWithEmailAndPassword(email, password), ); };
signInWithEmailAndPassword return undefinedTo Reproduce Steps to reproduce the behavior: Try to catch the error. (in props only message string)
Expected behavior signInWithEmailAndPassword(l.p).catch(error => console.log('error', error))
Additional context This behavior is not convenient for internationalization. How to translate the error messages? In your source looks like you wanted to return error object, and pass a message to props, but have bug.