How to allow only my app to access firebase without a login?
Solution 1
Enable Anonymous sing-in provider under Sing-in Method under Authentication tab in your Firebase Console and use firebase anonymous authentication
Solution 2
Firebase Real-Time DB does not allow access to Un-Authorized Users.
Making the Firebase Database Rules true for Read & Write is not the way as (Chintan Soni) said.
So a Authentication mechanism is the best way!
Related videos on Youtube
Sourav Kanta
I am a student of Computer Science Student in IIEST Shibpur, Howrah, India and I am extremely interested in android and website development. You can look me up at : https://sourav-kanta.000webhostapp.com/
Updated on June 04, 2022Comments
-
Sourav Kanta almost 2 years
I am storing my app's data on Firebase and this being my first project on Firebase is proving to be much more difficult than I thought. I have gone through the official documentation and it says that we can login a user with their email and password or use other login options like Google or Facebook etc. However I don't want user's to login to my application but only read and write data to firebase if they are using my app. Right now I am using public rules for my firebase but then anyone with a reference to my firebase URL can read and write to the database. How do I overcome this?
Thanks in advance.
-
finki almost 8 yearsWhat about using anonymous authentication? firebase.google.com/docs/auth/android/anonymous-auth
-
Chintan Soni almost 8 yearsYou have already introduced a major threat by making rules Public. Best way to overcome this is to implement Authentication. Period.
-
Avinesh over 7 years@finki what is difference between anonymous authentication and public.
-
-
Shohrab almost 7 yearseven if user doesn't have any application key?
-
Zar E Ahmer almost 7 yearsDoes firebase alows an app to publish with read ,write access without login(authentication)
-
Veeresh Charantimath almost 7 yearsyou can use anonymous login
-
atrujillofalcon about 6 yearsA firebase database can be public. All depends of auth rules.
-
Odin almost 6 yearsThis approach is for testing purposes only. It's a big security violation if used in production; anyone can read/write your database.
-
Haroun Hajem about 5 yearsThis should not be used in production.
-
Shafqat Kamal about 4 yearsi am facing an issue using firebase anonymous authentication. Can you help me with that?
-
Shafqat Kamal about 4 yearsI implemented auth into my android app also i have set rules in firebase to protect my firebase project from other app users. But still its not working.