Problem with secure database in firebase never work

I REALLY DONT UNDERSTAND how i can work with database in firebase
i make quiz app with simple login and signup system and points system
when i change the rules to auth
the app when sign-in or sign-up give me error ( permission denied)

how the app will work if give me error in sign-in and sign-up and don’t save the points when complete quiz ???

there is any solution ???

PLEASE DOT GIVE ME A LINK TO ARTICLE OR VIDEO i spend week watch videos and read articles about this and its not work at all

HELP TO RESOLVE PROBLEM

You will find here about securing the firebase rules

1 Like

i read the docs its not help me

i spend week watch videos and read articles about this and its not work at all

Don’t use all capitals. That is like shouting and we don’t shout here. And please read this…

Only one point you need to keep in mind. Suppose if you set authorization, then you need to getID token whenever user sign up or login success.

After getting this ID you need to change the existing firebase token to this getID token then only the permission denied will not appear and you can write into the firebase successfully…

sorry i dont mean to shouting , i search it in google YouTube Facebook groups communities
i dont find my answer

please can you show me how ?
I just want to protect the data, but I didn’t know how because I am not very good at it
I do not mean here to be relying on you, but I really got a headache from this problem and I would like to offer me a picture or a way to do this

No issue. By the way what type of authentication you are using… Email or Google or phone

Google mean immediately I will show the block, if not I have to work it

actually i make simple login signup system without use the authentication (just username and password ) to sign in or sign up

Then it is very very simple… please wait for few minutes… I will give the block. After the lunch break I will solve your query meanwhile if you get solution from others I will be more happy :blush:

1 Like

thankyou very much man Take your time, I will be grateful to you

If you are changing rule, then authendicatiin only will work. Anyway let me try

look first time the both true
then i put it
read true
write false
but this not work because the points not change

then i put this (picture) and give me permission denied when i sign up or login

and give me permission denied

Yes, thas what i said earlier… If you are assigning or changing the default firebase rule to auth mode, then you should enable users to sign in/login or signup via firebase authentication only.

https://firebase.google.com/docs/database/security

what must i do now ? because i want to start publish my app ?
if i change it to locked mode it will work or what ?

then ? what must i do if i enable firebase authentication sorry for many questions :innocent:

this code written for another user but methods are almost same… Here also i am writing and reading firebase in a protected manner

here is the blocks for sign in via google with firebase protected mode… Have a look at it…

2 Likes