I'm a new android developer and so confused about firebase rules and phone authentication.
I am writing an application for a scheduling system.
Right now, I'm using a phone number to authenticate users.
In my plan, I want to save the appointments in my realtime database firebase, and for each phone number I want to add user information, like name and their appointments.
The first question is how can I create a user for each phone? can I do that with phone authentication or do I need to create a user object and save it in the realtime database?
The second question is about security. I want my users to be able to see all the free appointments and to schedule one or more. What rules do I need to set for each user?