Firebase Database in several screens

Hi Koders!
I’ve been using Firebase Database in Screen1 without problems. Now, I need to use it in another screen of the same app so I added the component and used the same common properties in both screens:


But in the second screen I get “permission denied” error.
What should I fix?

Are you using firebase authentication ? Or rules in firebase??

1 Like

Yes. I tried to retrieve the IdToke in the next screen when it is initialized:

and after that, go online with Firebase DB, but it seems that something else is needed.

Triying to resolve this issue I have remembered that when I was dealing with Firebase Authentication for first time I had this same problem and finally resolve it by calling “get idToken” twice and setting the bucket after the “got token” event. I did the same in the new screen and the problem is solved.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.