react-redux-firebase icon indicating copy to clipboard operation
react-redux-firebase copied to clipboard

bug(types): profileFactory userData type definition incorrect

Open mrjogo opened this issue 4 years ago • 1 comments

Do you want to request a feature or report a bug?

bug

What is the current behavior?

The userData argument on the profileFactory callback is typed as AuthTypes.User, however the object that gets passed to the callback is AuthTypes.UserCredential.

What is the expected behavior?

The type definition of userData should be AuthTypes.UserCredential.

Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?

react-redux-firebase 3.7.0

mrjogo avatar Sep 06 '20 22:09 mrjogo

Actually, playing around a little more, it seems userData is different types depending on the signup method. With createUser({ email: '[email protected]', password: 'xxxx' }) it gets AuthType.UserCredential, but with login({ provider: 'google' }) it gets AuthType.User, or something like that.

mrjogo avatar Sep 06 '20 23:09 mrjogo