简体   繁体   中英

Firebase (Flutter) authenticate phone number always requires reCAPTCHA

Desired Result

Be able to authenticate a user via phone number on a flutter app running on a physical iPhone without seeing the reCAPTCHA screen

Actual Results

Am able to authenticate but every time I do I see the reCAPTCHA even though I have silent notifications enabled

Problem summary

I'm trying to setup my Flutter/Firebase app to authenticate via phone number on my iPhone. I have it working, but every time it authenticates it uses the reCAPTCHA verification instead of the desired silent notification process. In the error outputted in Android Studio is shown in the Console Output section below

Extra information

I started with this firebase tutorial to get the basic phone auth up and running. Then I followed this section to enable app verification on the iOS platform. That's when I started running into issues with only being able to validate using reCAPTCHA

I've been searching all over the internet and have seem similar questions but none of them have answered the problem...

Console Output

In the output block below it mentions error:Permission denied portName:'com.apple.iphone.axserver' but I have absolutely no idea what com.apple.iphone.axserver would be or what to modify to fix the issue.

[AXRuntimeCommon] Unknown client: Runner
7.11.0 - [Firebase/Analytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
    "deep_link_id" = "https://gladly-app.firebaseapp.com/__/auth/callback?authType=verifyApp&recaptchaToken=really long token. if it's required I can add it...";
}
[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:407 (
    0   AXRuntime                           0x00000001a5aeca9c 4000B9C5-BBB5-3718-8002-F2350DA460F9 + 346780
    1   AXRuntime                           0x00000001a5a9bb58 _AXGetPortFromCache + 548
    2   AXRuntime                           0x00000001a5a9d1a0 AXUIElementPerformFencedActionWithValue + 460
    3   UIKit                               0x00000001d025355c FEF8F17C-E529-34BE-91B9-D492B253DB94 + 853340
    4   libdispatch.dylib                   0x00000001878a32b0 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 393904
    5   libdispatch.dylib                   0x00000001878a4298 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 397976
    6   libdispatch.dylib                   0x000000018788034c 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 250700
    7   libdispatch.dylib                   0x0000000187880e34 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 253492
    8   libdispatch.dylib                   0x000000018788a674 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 292468
    9   libsystem_pthread.dylib             0x00000001cff715bc _pthread_wqthread + 272
    10  libsystem_pthread.dylib             0x00000001cff7486c start_wqthread + 8
)
[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:407 (
    0   AXRuntime                           0x00000001a5aeca9c 4000B9C5-BBB5-3718-8002-F2350DA460F9 + 346780
    1   AXRuntime                           0x00000001a5a9bb58 _AXGetPortFromCache + 548
    2   AXRuntime                           0x00000001a5a9d1a0 AXUIElementPerformFencedActionWithValue + 460
    3   UIKit                               0x00000001d025355c FEF8F17C-E529-34BE-91B9-D492B253DB94 + 853340
    4   libdispatch.dylib                   0x00000001878a32b0 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 393904
    5   libdispatch.dylib                   0x00000001878a4298 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 397976
    6   libdispatch.dylib                   0x000000018788034c 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 250700
    7   libdispatch.dylib                   0x0000000187880e34 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 253492
    8   libdispatch.dylib                   0x000000018788a674 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 292468
    9   libsystem_pthread.dylib             0x00000001cff715bc _pthread_wqthread + 272
    10  libsystem_pthread.dylib             0x00000001cff7486c start_wqthread + 8
)
[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:407 (
    0   AXRuntime                           0x00000001a5aeca9c 4000B9C5-BBB5-3718-8002-F2350DA460F9 + 346780
    1   AXRuntime                           0x00000001a5a9bb58 _AXGetPortFromCache + 548
    2   AXRuntime                           0x00000001a5a9d1a0 AXUIElementPerformFencedActionWithValue + 460
    3   UIKit                               0x00000001d025355c FEF8F17C-E529-34BE-91B9-D492B253DB94 + 853340
    4   libdispatch.dylib                   0x00000001878a32b0 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 393904
    5   libdispatch.dylib                   0x00000001878a4298 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 397976
    6   libdispatch.dylib                   0x000000018788034c 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 250700
    7   libdispatch.dylib                   0x0000000187880e34 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 253492
    8   libdispatch.dylib                   0x000000018788a674 16C9F613-7AE3-32CE-BA3A-B0DCF0464F0E + 292468
    9   libsystem_pthread.dylib             0x00000001cff715bc _pthread_wqthread + 272
    10  libsystem_pthread.dylib             0x00000001cff7486c start_wqthread + 8
)

Turns out all I had to do was add the key/value pair to the info.plist which was suggested by this post

<key>UIBackgroundModes</key>
<array>
    <string>remote-notification</string>
</array>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM