Doubt consists of the following problem:
I'm having a project using firebase and ionic 3. I am using the authentication mode via E-mail, where you have the email and UID stored.
For example: I have 2 registered users at the base.
1_ [email protected] UID = 123
2_ [email protected] UID = 321
In my code I have a message element that has the id of the submitter, for example:
Message 1 = description: "description", idUsername: "123"
I am logged in with the UID 321 user and want to retrieve the UID 123 user to view his email, how do I do that?
I did not want to store in the database of firebase, but since there is no other way, then someone would know how to create a registration screen that registers via email / password and stores that data in firebase. >
PS: I'm trying to use authentication via the user's token logged in to write to the database, but to do registration there is no token, so I'm not getting it.
It looks like this:
return this.http
.post(this.urlDataBase + email + '/user.json?auth=' + token, usuario)
.map((response: Response) => {
console.log(response);
return response.json();
});
But you are not saving on firebase, you are giving 400 error:
Response {_body: "{↵ "error" : "Invalid path: Invalid token in path"↵}↵", status: 400, ok: false, statusText: "Bad Request", headers: Headers, …}