【发布时间】:2021-02-14 06:06:33
【问题描述】:
我想接收用户的电子邮件并向他们发送重置密码请求。 我对解决方案没有任何运气。
private async void ForgetPassword_Clicked(object sende, EventArgs e)
{
var authReset = new FirebaseAuthProvider(new FirebaseConfig(WebAPIkey));
try
{
var email = UserLoginEmail.Text;
var auth = await authReset.SendPasswordResetEmailAsync(UserLoginEmail.Text);
var content = await auth.GetFreshAuthAsync();
var serializedcontent = JsonConvert.SerializeObject(content);
Preferences.Set("MyFirebaseRefreshToken", serializedcontent);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
await App.Current.MainPage.DisplayAlert("Alert", "Invalid email or password", "OK");
}
}
【问题讨论】:
标签: firebase authentication xamarin xamarin.forms cross-platform