public async Task <bool> SendResetPasswordEmail(string email) { var sendResetMailTask = _auth.SendPasswordResetEmailAsync(email); try { await sendResetMailTask; return(true); } catch (Exception e) { if (sendResetMailTask.IsCanceled) { Debug.LogError("Password reset was canceled."); Console.WriteLine("Password reset was canceled."); return(false); } if (sendResetMailTask.IsFaulted) { Debug.LogError("Password reset encountered an error."); Console.WriteLine("Password reset encountered an error."); return(false); } Debug.LogError(e); Console.WriteLine(e); return(false); } }
public void ResetPassword() { var email = emailForm.text; if (email.Length > 0) { auth.SendPasswordResetEmailAsync(email).ContinueWith(task => { if (task.IsCanceled) { Debug.Log("ResetPassword Cancelled!"); return; } if (task.IsFaulted) { Debug.Log("ResetPassword Faulted!"); return; } Debug.Log("Şifre sıfırlama gönderilmiştir!"); }); } else { Debug.Log("Email alanını boş bırakmayınız!"); } }
public void Launch() { if (Mail.text == "") { errorText.text = "Please complete all fields"; return; } //Debug.Log("Forgot Password launched."); string deviceModel = SystemInfo.deviceModel.ToLower(); //Amazon Device check if (!deviceModel.Contains("amazon")) { auth.SendPasswordResetEmailAsync(Mail.text).ContinueWith(task => { if (task.IsCanceled) { Debug.LogError("SendPasswordResetEmailAsync was canceled."); return; } if (task.IsFaulted) { Debug.LogError("SendPasswordResetEmailAsync encountered an error: " + task.Exception); return; } Debug.Log("Password reset email sent successfully."); instructionsButton.SetActive(true); }); } else { StartCoroutine(SendDetails()); } }
void ResetPasswordClicked() { FirebaseAuth auth = FirebaseAuth.DefaultInstance; FirebaseUser user = auth.CurrentUser; if (user != null) { if (EmailAddress.text != null) { auth.SendPasswordResetEmailAsync(EmailAddress.text).ContinueWith(task => { if (task.IsCanceled) { Debug.LogError("SendPasswordResetEmailAsync was canceled."); return; } if (task.IsFaulted) { Debug.LogError("SendPasswordResetEmailAsync encountered an error: " + task.Exception); return; } Debug.Log("Password reset email sent successfully."); }); } else { Debug.Log("Email Address is Empty Please fill so we can send password reset link"); } } }
public override Task SendRecoverPasswordEmail(string email) { if (email == null) { throw new ArgumentNullException(nameof(email)); } return(_auth.SendPasswordResetEmailAsync(email) .Success(() => Debug.Log($"Recovery email sent to {email}")) .Failure <FirebaseException>(e => Debug.LogException(Exception($"Failed to send recovery email to {email}: {e.Message}", e)))); }
// Send a password reset email to the current email address. protected void SendPasswordResetEmail() { auth.SendPasswordResetEmailAsync(email).ContinueWith(authTask => { if (LogTaskCompletion(authTask, "Send Password Reset Email")) { DebugLog("Password reset email sent to " + email); } }); }
public async void RecuperarSenha() { PreCadastro(); await auth.SendPasswordResetEmailAsync(email.text).ContinueWith(task => { }); Debug.Log("Acesse seu email para verificar e trocar sua senha!"); PosCadastro(); }
public void ResetPassword(string _email) { auth.SendPasswordResetEmailAsync(_email) .ContinueWith(task => { if (task.IsCanceled || task.IsFaulted) { Signals.ShowNotification.Invoke("Ошибка! Письмо для сброса пароля не было отправлено на электронную почту."); } else { Signals.ShowNotification.Invoke("Письмо для сброса пароля было отправлено на электронную почту."); } }); }
public async Task <bool> SendPasswordResetEmailAsync(string email) { try { await _firebaseAuth .SendPasswordResetEmailAsync(email); return(true); } catch (Exception ex) { // ERROR_USER_NOT_FOUND _loggerService.LogException(ex.Message); return(false); } }
public async void ResetPasswordWithEmail(string email) { OpenDialogLoading(); try { await auth.SendPasswordResetEmailAsync(email); CloseDialogLoading(); // UpdateStatusResetPass("Password Reset Email has been sent, please check your email"); OpenDialogResetPass(); } catch (Exception ex) { UpdateStatusResetPass("Email yang dimasukkan salah/tidak terdaftar."); CloseDialogLoading(); Debug.Log(ex.InnerException.Message); } }
public void SendPasswordResetMail(string email) { Debug.Log("sent"); m_auth.SendPasswordResetEmailAsync(email).ContinueWithOnMainThread(task => { if (task.IsCanceled) { Debug.LogError("SendPasswordResetEmailAsync was canceled."); return; } if (task.IsFaulted) { FirebaseException exception = task.Exception.InnerExceptions[0].InnerException as FirebaseException; var errCode = (AuthError)exception.ErrorCode; GetErrorMessage(errCode.ToString()); return; } Debug.Log("Password reset email sent successfully."); }); }
// Şifre Sıfırlama İşlemi public void ResetPassword() { string email = emailForm.text; auth.SendPasswordResetEmailAsync(email).ContinueWith(task => { if (task.IsCanceled) { Debug.Log("Canceled"); return; } if (task.IsFaulted) { Debug.Log("Faulted"); return; } Debug.Log("Sıfırlama epostası gönderildi."); }); }
void RedefinirSenha() { Firebase.Auth.FirebaseUser user = auth.CurrentUser; string emailAddress = user.DisplayName; if (user != null) { auth.SendPasswordResetEmailAsync(emailAddress).ContinueWith(task => { if (task.IsCanceled) { Debug.LogError("SendPasswordResetEmailAsync was canceled."); return; } if (task.IsFaulted) { Debug.LogError("SendPasswordResetEmailAsync encountered an error: " + task.Exception); return; } Debug.Log("Password reset email sent successfully."); }); } }
//public Task<FirebaseUser> SignInUserWithEmailAndPassword(string email, string password) //{ // return SignInUserWithEmail(email, password); //} public Task SendRecoverPasswordEmail(string email) { return(auth.SendPasswordResetEmailAsync(email) .WithSuccess(() => Debug.Log("Recovery email sent to " + email)) .WithFailure <FirebaseException>(e => Debug.Log("Failed to send recovery email to " + email + ": " + e.Message))); }