Firebase database rules

Hello koders,
I want a perfect rules for my database
I want only authentic user can write it
But anybody can read
For example if a non-authentic user will open app it Will ask to sign up or login when user singup it will be authentic user. Now he/she can read and write antire database Through this app only.
PLEASE HELP ME :pray: :cry:

Please search the forum as there are many topics about this already.

many people is asking but my question is,How does app will know this is authenticated person

They will need to sign in to Firebase. This should return their idToken which is used to authenticate their read/writes.

after sign in i will get token how can i use token.give me example block.please i am new in kodular and firebase

or

@TimAi2 i have been takan user how i can use it?