Skip to content

FirebaseAuth - Requests from this Android client application <empty> are blocked #1757

Closed
@rmatihara

Description

@rmatihara

Describe your environment

  • Firebase component and version: firebase-auth: 19.3.1, firebase-core: 17.4.1

Describe the problem

We have developed Sign in with Apple on Android and confirmed that it is working properly.

But, when we have restricted the API key to Android with fingerprint and package name in the Google Cloud Console, it does not work with the following error:

{"error":{"code":403,"message":"Requests from this Android client application <empty> are blocked.","errors":[{"message":"Requests from this Android client application <empty> are blocked.","domain":"global","reason":"forbidden"}],"status":"PERMISSION_DENIED"}}
An internal error has occurred. [ Requests from this Android client application <empty> are blocked. ]

When we remove the restriction on the API key on Google Cloud Console, everything works properly.

We have found on the docs that all request to the API must send the following headers, should it be the problem?

Header x-android-package
Label servicecontrol.googleapis.com/android_cert_fingerprint

Header x-android-cert 
Label servicecontrol.googleapis.com/android_package_name

Steps to reproduce:

Create a demo app (https://github.com/firebase/FirebaseUI-Android), implement the Sign in with Apple and restrict the API Key with fingerprint and package name on Google Play Console.
Then, try to login with Apple.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions