I am new to Kodular but I have been enjoying it for the last few weeks. Previously I have used thunkable.
My app needs to use a firebase database and I have set it up. It works when installed to a phone via an apk but not through Companion which I understand is by design?
Up to now I have used Companion for all my development / testing and its a great system, especially through the USB - very quick. If I have to do all the database development through the apk route it is not going to be usable.
Is there any way to use firebase when I am developing the app that works with Companion? Perhaps a Web API or an extension?
I missed this entirely. It didn’t occur to me that I could use the database without the Authenticating component. I already have a firebase database which I put into the url of the database component. How do I securely access the database while developing using Companion without using Firebase Authentication? I see there is a Firebase Token property already populated - do I use this in a rule? Do I set this to something from the Firebase Console?
Please excuse my not understanding such a basic point. I have read the documentation and searched but I still don’t get it.
It works. So I guess the problem is just how to protect the database while it is in development? It is not ideal to open it up to the world like this. I will read up some more on rules.
Thanks @ImranTariq. I think I have a working solution but it does not appear to be ideal.
I can set up 2 sets of rules in Firebase, one set for a ‘production’ bucket and another set for a ‘develop’ bucket…
Here is the data…
Now when I am developing I use the ‘develop’ project bucket as the property for the firebase database. I can bypass a user login step by initialising a variable with a Firebase User UID and saving data to a bucket of that name etc etc
When I release a production app I just change the Project Bucket to ‘prod’ which the firebase rules are set up to allow only authenticated users. Obviously rules can be expanded to only allow access to their own data etc as required.
This look workable but it does not provide any protection to the develop bucket in the database which does not appear to be desirable? Is it intended that Kodular firebase development be done in such an unsafe manner? Am I missing a better solution?
well, playing with firebase rules is still a mystery for many users including me, i have tried that to set many times as you are trying but after failing i leaved and started using other databases, i think if someone can help the only will be staff of firebase.
I think there is no need to use two project buckets.
What you can do is to set rules to test mode while developing app and change it to locked mode when your app is ready to be published or tests.
Yes this could work as well, but even after going live there will always be a need to bug fix / further develop. It is mostly a matter of preference though.
I am interested to see if anyone has an opinion on this?
Also, What about the use case where a firebase database is needed but only the app itself will authenticate? For instance to store shared information between users. How does this work?