Please provide the following:
- SDK Version: 42.0.0
- Platforms(Android/iOS/web/all): Android
In short: Can android app, done with Expo, using Firebase authentication (Identity Toolkit) API key be restricted to use android app?
I have an android application that uses Firebase’s services. I have added android application in my Firebase project and tried to restrict the android application auto generated key (in Google console) but have not been successful.
-I have used Using Firebase - Expo Documentation for Firebase SDK setup .
-Downloaded google-service.json, added it to root of project (same level that app.json is in) and defined it in app.json “expo.android.googleServicesFile”: “./google-services.json”.
-And at the Google console to the autogenerated api key for my Firebase project’s android app:
–I have defined “Android apps” application restrictions ,
–added Package name from app.json “expo.android.package”
–and gotten the SHA-1 certificate fingerprint from https://expo.dev/accounts/{username}/projects/{project}/credentials
Classic Android Credentials: Build Credentials: SHA-1 Certificate Fingerprint .
I have not yet added the application to Google Play.
I have been able to restrict Maps SDK for Android and Geocoding API with just adding package name and SHA-1 certificate to Google credentials console so I’m puzzled why this does not work.
Thank you for all the help!