Skip to content

Phone authentication with reCAPTCHA & api key restriction issue #7653

Closed
@antoninbiret

Description

@antoninbiret

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.4
  • Firebase SDK version: 7.7.0
  • Installation method: CocoaPods
  • Firebase Component: Auth

[REQUIRED] Step 2: Describe the problem

I recently discovered that the reCAPTCHA phone authentication flow did not work as expected in my project but was working well before. The silent push authentication flow works fine tho.

I get the following error:

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

My firebase API key is restricted to be used by both my development & staging app's bundle identifier. If I remove the restriction the reCAPTCHA flow is working fine.

Did some debugging and find out the ibi parameter in the reCAPTCHA URL request is set and equal to my application's bundle identifier.

Am I the only one seeing this issue ?

Steps to reproduce:

Restricting firebase API key on the google cloud console for the app's bundle identifier and try the reCAPTCHA authentication flow.

Thanks in advance for any feedback.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions