Firebase Authentication issue

I know there are other posts on this, but I’m still having issues and the solutions aren’t working for me. I understand that I should be using the SHA1 that I get from the play console… except that I’m not using the play store for distribution. I am being forced to leave my database unsecured because I get permission denied errors unless I just make read/write true. I’m currently using the firebase authentication to get the google account from the device and ensuring that it’s from the company domain so at least only our employees can log into the app, but I want to secure the database.

“auth != null” doesn’t even work and all that requires is that you are signed into the app with a google account.

1 Like

Are you not supposed to use SHA1 of your keystore (I have no clue of firebase so I might be wrong)

Sorry, I saw that in another thread. I did get my SHA2 from Kodular and put it in firebase. tried to follow all the steps and still get nothing. Luckily we do not store any customer information in that database, but there is a list of active employees that I would like to secure.

I’ve deleted the app and clientID from the whitelist in Firebase and tried to follow these instructions
https://docs.kodular.io/components/google/firebase-authentication/#client-id
The Client ID tool isn’t at the link provided so I tried to pull it from the JSON file and whitelisted it per the Kodular Docs and I get Permission Denied.

Let’s see if @ImranTariq can help you with this (since this is his specialty)

3 Likes

For secure your firebase you SHOULD use this block

SHA1 key is being used for firebase auth, and you need to read these Docs, contains all info and rules info you have needed.

Firebase Rules

Securing Firebase

1 Like

@ImranTariq is there any way to get access to the AIA file at the end of the “Securing Firebase” doc link? I tried downloading it but get an access denied error.

Thanks!

The link is broken, let us see if the team can fix it @KodularCreator at the bottom of Securing Firebase - Kodular Docs aia is not downloadable

1 Like

Thanks @Boban for the reply!
I hope we can get it fixed.

I’ve read those. They aren’t handling this problem. Authentication is through Google Login, I get logged in successfully and see the google account as an authenticated user on firebase. but when I open my home screen I get the permission denied error. This is why I asked. I spent days searching the community and eventually gave up and left firebase in test mode because it appeared that the users having the same issues never got a good answer on how to solve this problem. I built into the app that it won’t work for google logins outside the company but my database is still unsecured.

I’m still lost on getting this working. Seems like it should be working, tells me it worked… and then I get access denied unless I have read & write both just set to true.

Is there something special I need to be doing for multiple screens to use firebase? since I’m logging on on Screen1 but accessing things from screen Home, is that causing an issue?

Sha1 key is in Firebase. ClientID is whitelisted (at least what I could determine from the JSON file since your tool is missing). Linking me to files I’ve already read didn’t help. Something is wrong. My user is logged in. I can grab the User ID from the following screen and put it in an alert, but they still can’t access the database unless I have it in test mode. This is the third time I’ve tried to get this to work by deleting all the info from firebase, adding it all in fresh (including SHA1 from the creator settings) and uploading a new Google-Services.json file to my assets.

Here is the error I get. The toast message is MY userID grabbed from the authenticator so I know I’m signed in.

I’ve broken down and published as a closed Alpha to the play store in the hopes that I can use their SHA-1 to get it to work.

so what are your rules of firebase now? show a screen shot.

This doesn’t work. It gives me the error above.
Firebase Rules Not Null

This is the only thing that lets me have access to the DB.
Firebase Rules All True

I have tried to follow all the direction on the two pages you linked me to as well as on Firebase Authentication - Kodular Docs. Nothing seems to work.

I have also put both SHA-1 keys (one from Kodular Settings and one from Google Play Console) in the App settings and added that JSON file to the app. I have whitelisted all 3 client IDs from the JSON file in Google Sign In settings too. My Users show up under the authentication screen on Firebase as signed in, but can only access the database if I have the test rules in place.

try watching this video to understand how this works, i am too much busy these days otherwise i check that and configure for you.