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

how to tell on the client side that the user is logged in when using node js and react #97

Open
naissa12 opened this issue Oct 9, 2019 · 1 comment

Comments

@naissa12
Copy link

naissa12 commented Oct 9, 2019

I used the following code (https://github.com/firebase/quickstart-nodejs/blob/master/auth-sessions/app.js) to log a user in using React and Nodejs and Firebase. I can tell if someone is logged in using NodeJs, but not on the ReactJs side. I used the code and that does not work after a few minutes:

app.auth().onAuthStateChanged((user) => {

@bojeil-google
Copy link
Contributor

Hey @naissa12, the sample code is only for server side sessions (via httpOnly cookies).
Notice we set persistence to NONE

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