获取 App Check 令牌时出错;改用占位符令牌。错误:com.google.firebase.FirebaseException:API 返回错误。代码:403 正文:应用认证失败。忽略标头 X-Fire...
获取 App Check 令牌时出错;改用占位符令牌。错误:com.google.firebase.FirebaseException:API 返回错误。代码:403 正文:应用认证失败。忽略标头 X-Firebase-Locale,因为其值为空。[SmsRetrieverHelper] 短信验证码请求失败:未知状态代码:17093 为空
Future<void> main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); if(!kDebugMode) { await FirebaseAppCheck.instance.activate( androidProvider: AndroidProvider.playIntegrity, appleProvider: AppleProvider.appAttest, webProvider: ReCaptchaV3Provider('recaptcha-v3-site-key'), ); } else { await FirebaseAppCheck.instance.activate( androidProvider: AndroidProvider.debug, appleProvider: AppleProvider.debug, ); } FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler); FirebaseAuth.instance.setSettings(appVerificationDisabledForTesting: true); runApp(const MyApp()); } Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async { // Handle background messages here. print("Handling a background message: ${message.messageId}"); }