コード例 #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("Письмо для сброса пароля было отправлено на электронную почту.");
         }
     });
 }
コード例 #9
0
        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
ファイル: FirebaseManager.cs プロジェクト: brunocav/Firebase
    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)));
    }