Firebase Auth: Requests from this Android client application com.xxx are blocked

前端 未结 8 836
温柔的废话
温柔的废话 2021-02-05 12:08

I\'m implementing the standard tutorial for Firebase AuthUI in my android app. However, when testing I try to sign-in using Google sign-in from within the app and get the follow

相关标签:
8条回答
  • 2021-02-05 12:30

    The Google Cloud API key I was using was restricted to android with my package name, but only the production SHA-1 certificate fingerprint was given, not the debug key. I added the debug key's SHA-1 certificate along with the package name so that both production and debug certificates appear in the "Application Restrictions" for the key and it worked. Apparently being "blocked" by firebase means your API key may be restricted improperly.

    0 讨论(0)
  • 2021-02-05 12:30

    For anyone else who might be facing this problem, it is possible that you are using Internal App Sharing on the Play console, with Google signing enabled. If so, you may have forgotten to add their debug SHA-1 key to your firebase console.

    Pretty hard to debug, or find an answer, so I'm hoping I've added all the right keywords to help the next guy.

    0 讨论(0)
  • 2021-02-05 12:34

    I just faced the same problem today and fortunately solved the problem. I still don't have any idea why this was happening but here are the steps I had taken to solve :

    1. Delete the already added SHA-1 signing-certificate fingerprint in the Firebase console settings.
    2. Go to android studio and Sync Project with Gradle Files.
    3. Add SHA-1 signing-certificate fingerprint again to the Firebase Console Settings.

    Here is how you can add SHA-1 signing-certificate fingerprint to firebase : CLICK HERE

    0 讨论(0)
  • 2021-02-05 12:40

    I've had this problem and looked left and right for a solution. Turns out, in my case at least, that you actually need to go the Credentials screen in the Google Cloud Platform and there you'll find this:

    Restrict usage to your Android apps Add your package name and SHA-1 signing-certificate fingerprint to restrict usage to your Android apps

    There you can ADD NEW ITEM, meaning your application package and its SHA-1 signature. Then you won't have this problem anymore (assuming the rest of the configuration is done). My app had its key restricted for Android apps and this step was a necessary one.

    0 讨论(0)
  • 2021-02-05 12:41

    I also appeared in same problem, when I changed platform for my Project. Even I added SHA-1 key to firebase console it was not working. After I checked in Google cloud platform (console.cloud.google.com) with my project name. I show that Auto generated API key does not contains my new SHA-1 key. so I updated it manually by adding project's package name and SHA key and it works.

    0 讨论(0)
  • 2021-02-05 12:41

    In my case:

    If you are using Google Play App Signing, just login into Firebase go into "project settings"->"integration" and press a button to link Google Play with firebase, SHA-1 will be added automatically. Download and change your new google-services.json

    If you keep having problems, go to Google Cloud API, click on the hamburger icon on the top left -> APIs and Services -> Credentials. Choose the API Key that you're using. Under restrictions, select "None".

    0 讨论(0)
提交回复
热议问题