I am using firebase (with Angularfire) for an html5 phone app. The user inputs only their email in the start screen, and then, depending on whether that email is already registered or not, the user is redirected to the login or registration page, respectively. For step1, how can we query the firebase simple login to determine if the email is registered or not?
Update 7/19/2018
The previous mention method is deprecated. Now fetchSignInMethodsForEmail is used.
Update 6/26/2016
A lot has changed since this was originally posted, Firebase Authentication is no longer called Firebase Simple Login.
Additionally, it looks like a new method is available fetchProvidersForEmail
which might provide a solution to this problem.
From the docs:
fetchProvidersForEmail(email) returns firebase.Promise containing non-null Array of string
Gets the list of provider IDs that can be used to sign in for the given email address. Useful for an "identifier-first" sign-in flow.
I have not tested this but I'd imagine if you call that method and receive an array of providers then the e-mail must already be registered with one or more authentication providers.
Old Answer
I don't believe you can query the Firebase Simple Login directly for that information without either trying to actually login the user or register them.
What you'd need to do is store a list of registered e-mails during your registration process and query that list instead. Then you can query that path and if it comes back with data, it exists, otherwise it doesn't.