I have an app that uses firebase authentication. My question is, what is the proper way to do conditional rendering based on whether the user is logged in or not? If I use something like:
(conditionalboolean) ? render (<p>yes logged in</p>) : render (<p>not logged in</>)
would the data I want to protect still be downloaded to their browser and visible on developer tools somehow? I am not finding an answer to this question. Can someone please point me in the right direction?
thanks! Matt
If the showing/hiding of the content happens in the browser, then indeed that content will have to live in the user's browser before it can be hidden. And that means that it is discoverable by malicious users.
If the showing/hiding happens in server-side code, you can prevent hidden content from reaching the user's browser entirely. And if the content doesn't reach the user's browser, they can never discover it there.