예제 #1
0
        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);
            }
        }
예제 #2
0
    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!");
        }
    }
예제 #3
0
    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());
        }
    }
예제 #4
0
    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");
            }
        }
    }
예제 #5
0
 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))));
 }
예제 #6
0
 // 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);
         }
     });
 }
예제 #7
0
    public async void RecuperarSenha()
    {
        PreCadastro();

        await auth.SendPasswordResetEmailAsync(email.text).ContinueWith(task =>
        {
        });

        Debug.Log("Acesse seu email para verificar e trocar sua senha!");

        PosCadastro();
    }
예제 #8
0
파일: AuthUser.cs 프로젝트: nnton3/AR_Tutor
 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);
            }
        }
예제 #10
0
    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);
        }
    }
예제 #11
0
    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.");
        });
    }
예제 #12
0
    // Ş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.");
        });
    }
예제 #13
0
    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.");
            });
        }
    }
예제 #14
0
    //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)));
    }