【发布时间】:2021-01-21 07:36:41
【问题描述】:
我正在为我的颤振应用程序使用 Firebase 身份验证。我为这个代码配置了firebase并开始使用
login() async {
await FirebaseAuth.instance
.verifyPhoneNumber(
phoneNumber: '+447123123456',
verificationCompleted: (PhoneAuthCredential credential) {},
verificationFailed: (FirebaseAuthException e) {
print("Code Failed 2");
print(e);
},
codeSent: (String verificationId, int resendToken) {
print("Code Send");
},
codeAutoRetrievalTimeout: (String verificationId) {},
)
);
}
当我执行这段代码时,它会打印出来
I/BiChannelGoogleApi(13432): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms:
com.google.firebase.auth.api.internal.zzaq@3665a442
I/flutter (13432): Code Failed 2
I/flutter (13432): [firebase_auth/null] null
无法跟踪错误消息并且验证码未发送到我的设备我使用此链接作为参考https://firebase.flutter.dev/docs/auth/phone/
【问题讨论】:
-
你用的是安卓还是IOS?
-
目前是安卓
-
尝试 +44 7123 123 456 使用空格
标签: firebase flutter firebase-authentication one-time-password