Skip to content

Retrieving AuthUser from useAuthUser #263

Answered by kmjennison
MattHeslington asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Matt, thanks!

To check if there's a logged-in user, I recommend checking if AuthUser.id is set. Also, your useEffect hook is missing AuthUser as a dependency, so like @shreyas-jadhav mentioned, it's probably running before the Firebase client has initialized.

If it's still not working, please try running the example app in this repository with your own Firebase settings to see if you can get that working.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MattHeslington
Comment options

Answer selected by MattHeslington
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants