I read many articles in the community about selecting the object properties and read from realtime database by Firebase, these kind of topics. But still can’t solved my problem.
Is there any problem in my code. The only thing I can nearly get is to show the json file from DB. But what I really want is to just showing the role properties’s value (which is Teacher, Student, or Admin) from the INFO. Can someone help me to solve this. Thank you !
Thank you.
Just tried still won’t work. Is it because my key cannot select my user-name?
Not sure most of the tutorial show use UID and are after Login, but I cant generate one on first Signup right?
[Solved] Although I still can’t read data in Firebase, when I set (ACCOUNT/user-name/INFO/role). But I found out user uid can work, just that it only work when the user’s email is verified. So I change the login/signup flow.
User 1st register > back to Login Page > verify email > 1st time Login > Register User Detail (cuz UID just generated here) > Navigate to Page according to role.