Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signInWithEmailAndPassword returns user, not UserCredential #120

Open
BrianChapman opened this issue Nov 20, 2018 · 2 comments
Open

signInWithEmailAndPassword returns user, not UserCredential #120

BrianChapman opened this issue Nov 20, 2018 · 2 comments

Comments

@BrianChapman
Copy link

BrianChapman commented Nov 20, 2018

The signInWithEmailAndPassword method is supposed to return a promise containing [UserCredential] (https://firebase.google.com/docs/reference/js/firebase.auth#.UserCredential) but it returns a partial user object (https://github.com/soumak77/firebase-mock/blob/master/src/firebase-auth.js#L124)

In fact all return a UserCredential except signInWithCredential which does return a user, signInWithPhoneNumber which returns a ConfirmationResult, and signInWithRedirect which returns void.

@ghost
Copy link

ghost commented Mar 25, 2019

I've just submitted a pull request that similarly modifies createUserWithEmailAndPassword.

@brandonpearcy
Copy link

+1 This really caught me off guard when we first started to use firebase-mock. After digging through the source, finally figured out that the API of firebase-mock differs from that of the actual Firebase SDK. It makes it hard to actually use firebase-mock in production code, because we would have to adjust the code to handle two APIs (and risk hard-to-catch bugs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants