美好的一天,如何注册一个我使用此代码的帐户后如何在Xamarin上发送电子邮件验证,但是在sendEmailVerification
中它说FirebaseAuth没有定义sendEmailVerification
我怎样才能解决这个问题?
private void LoginUser(string email, string password){
if (input_password.Text == reinput_password.Text){
auth.CreateUserWithEmailAndPassword(email, password)
.AddOnCompleteListener(this, this);
auth.sendEmailVerification(email)
.AddOnCompleteListener(this, this);
}
}
最佳答案
SendEmailVerification(Async)
是FirebaseUser
实例上的方法:
示例(使用Xamarin异步包装器):
auth = FirebaseAuth.Instance;
using (var authResult = await auth.CreateUserWithEmailAndPasswordAsync("[email protected]", "stackoverflow"))
using (var user = authResult.User)
using (var actionCode = ActionCodeSettings.NewBuilder().SetAndroidPackageName(PackageName,true, "0").Build())
{
await user.SendEmailVerificationAsync(actionCode);
}
关于c# - Xamarin Firebase发送电子邮件验证,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53975357/