

Here is an example of my singup action I use to create a user, then store to the database. You then, and should at the same time store your user into the database with relevant signup data. only 'creates' the user within the firebase LOGIN. It sounds like you need to reformat this question to be more clear. I think the method of th().onAuthStateChanged is running in the background, so every time when I successfully crated a new user, that method th().onAuthStateChanged will detect that user is not null, then it will return.
#STACK OVERFLOW SHOW FIREBASE USERNAME IN REACTCHAT HOW TO#
How to pass the data to firebase and retrive from firebase?Īnd there is another problem which is everytime when I successfully registered as new user, it suppose to go to the next page to upload the picture, but it didn't, it just jump to the RootPage.Įven when I added on line like like (('PhotoPage')), every time when I finished the registration it will go to the first, but it just show one second, then it automatically jump to. Codementor is the largest community for developer mentorship and an on-demand marketplace for software developers.

I searched a lot online and made a little change on the code like below but it doesn't work at all.

I'm using firebase to do an authentication (login and logout), but the method of th().createUserWithEmailAndPassword() can only pass two parameters, I also want to pass the username and user profilePic to firebase and stored by it, so when login, the corresponding profilePic and user name can be displayed.
