我试图在Flutter中使用Firebase实施电话身份验证。根据文档使用了以下代码。
await _auth.verifyPhoneNumber(
phoneNumber: phoneNumber,
timeout: Duration(seconds: 60),
verificationCompleted: (authCredential) => _verificationComplete(authCredential),
verificationFailed: (authException) => _verificationFailed(authException),
codeAutoRetrievalTimeout: (verificationId) => _codeAutoRetrievalTimeout(verificationId),
// called when the SMS code is sent
codeSent: (verificationId, [code]) => _smsCodeSent(verificationId, [code])
);
验证过程正常。但是我需要获取已被抖动自动恢复的OTP,以便可以在屏幕上显示它(就像在几乎所有应用程序中一样)。该怎么做?
verifyPhoneNumber()
中给出的哪些方法可以获取该自动检索的OTP?