该问题可能与Google API 针对Firebase的限制有关,其中Google API可能在首次退出登录时未被正确配置。解决此问题的方法是将FirebaseAuth进行初始化并设置API密钥。以下是设置API密钥的示例代码:
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_auth/firebase_auth.dart';
await Firebase.initializeApp();
FirebaseAuth.instance.setSettings(
appVerificationDisabledForTesting: false,
apiKey: 'YOUR_API_KEY_HERE',
);
当然,在确保构建应用程序时已正确配置Firebase应用程序之后,可能需要检查其他相关设置和权限。
上一篇:AmplifyFederatedSignIn不返回Facebook的电子邮件地址
下一篇:AmplifyFlutter提示“MorethanonegraphQLAPIconfigured.CouldnotinferwhichAPItocall”。