junglevast.blogg.se

Stack overflow show firebase username in reactchat
Stack overflow show firebase username in reactchat










stack overflow show firebase username in reactchat

Index.js (imports and other stuff is left out) root.render(ĪuthProvider.js import React, = useContext(AuthContext) įor a more conventional method of implementing route protection see my answer here. And at that point I thought that at this point it would be better to create an Endpoint API that the moment a user needs to be created it receives a username and password and creates it both the field in 'Authentication' and the.

#STACK OVERFLOW SHOW FIREBASE USERNAME IN REACTCHAT CODE#

Here is some code that could help you out: The solution I found is to use a firebase function that every time a user is created it reflects it in firestore. I am using firestore for my chat application.

stack overflow show firebase username in reactchat

I have a login screen and a landing screen which is accessed only if you are logged in.įor some reason, when I am logged in and I refresh my landing screen, it redirects me to login screen and then back to the landing screen. I implemented Firebase authentication in my app by the docs.












Stack overflow show firebase username in reactchat